readJson

fun DataFrame.Companion.readJson(file: File, header: List<String> = emptyList(), keyValuePaths: List<JsonPath> = emptyList(), typeClashTactic: JSON.TypeClashTactic = ARRAY_AND_VALUE_COLUMNS, unifyNumbers: Boolean = true): AnyFrame

Return

DataFrame from the given file.

Parameters

file

Where to fetch the JSON as InputStream to be converted to a DataFrame.

keyValuePaths

List of JsonPaths where instead of a ColumnGroup, a FrameColumn<NameValueProperty> will be created.

typeClashTactic

How to handle type clashes when reading a JSON file.

header

Optional list of column names. If given, the file will be read like an object with header being the keys.

unifyNumbers

Whether to unify the numbers that are read. true by default.


fun DataFrame.Companion.readJson(path: Path, header: List<String> = emptyList(), keyValuePaths: List<JsonPath> = emptyList(), typeClashTactic: JSON.TypeClashTactic = ARRAY_AND_VALUE_COLUMNS, unifyNumbers: Boolean = true): AnyFrame

Return

DataFrame from the given path.

Parameters

path

Where to fetch the JSON as InputStream to be converted to a DataFrame.

keyValuePaths

List of JsonPaths where instead of a ColumnGroup, a FrameColumn<NameValueProperty> will be created.

typeClashTactic

How to handle type clashes when reading a JSON file.

header

Optional list of column names. If given, the file will be read like an object with header being the keys.

unifyNumbers

Whether to unify the numbers that are read. true by default.


fun DataRow.Companion.readJson(file: File, header: List<String> = emptyList(), keyValuePaths: List<JsonPath> = emptyList(), typeClashTactic: JSON.TypeClashTactic = ARRAY_AND_VALUE_COLUMNS, unifyNumbers: Boolean = true): AnyRow

Return

DataRow from the given file.

Parameters

file

Where to fetch the JSON as InputStream to be converted to a DataRow.

keyValuePaths

List of JsonPaths where instead of a ColumnGroup, a FrameColumn<NameValueProperty> will be created.

typeClashTactic

How to handle type clashes when reading a JSON file.

header

Optional list of column names. If given, the file will be read like an object with header being the keys.

unifyNumbers

Whether to unify the numbers that are read. true by default.


fun DataRow.Companion.readJson(path: Path, header: List<String> = emptyList(), keyValuePaths: List<JsonPath> = emptyList(), typeClashTactic: JSON.TypeClashTactic = ARRAY_AND_VALUE_COLUMNS, unifyNumbers: Boolean = true): AnyRow

Return

DataRow from the given path.

Parameters

path

Where to fetch the JSON as InputStream to be converted to a DataRow.

keyValuePaths

List of JsonPaths where instead of a ColumnGroup, a FrameColumn<NameValueProperty> will be created.

typeClashTactic

How to handle type clashes when reading a JSON file.

header

Optional list of column names. If given, the file will be read like an object with header being the keys.

unifyNumbers

Whether to unify the numbers that are read. true by default.


fun DataFrame.Companion.readJson(path: String, header: List<String> = emptyList(), keyValuePaths: List<JsonPath> = emptyList(), typeClashTactic: JSON.TypeClashTactic = ARRAY_AND_VALUE_COLUMNS, unifyNumbers: Boolean = true): AnyFrame

Return

DataFrame from the given path.

Parameters

path

URL or file path from where to fetch the JSON as InputStream to be converted to a DataFrame.

keyValuePaths

List of JsonPaths where instead of a ColumnGroup, a FrameColumn<NameValueProperty> will be created.

typeClashTactic

How to handle type clashes when reading a JSON file.

header

Optional list of column names. If given, the stream will be read like an object with header being the keys.

unifyNumbers

Whether to unify the numbers that are read. true by default.


fun DataRow.Companion.readJson(path: String, header: List<String> = emptyList(), keyValuePaths: List<JsonPath> = emptyList(), typeClashTactic: JSON.TypeClashTactic = ARRAY_AND_VALUE_COLUMNS, unifyNumbers: Boolean = true): AnyRow

Return

DataRow from the given path.

Parameters

path

URL or file path from where to fetch the JSON as InputStream to be converted to a DataRow.

keyValuePaths

List of JsonPaths where instead of a ColumnGroup, a FrameColumn<NameValueProperty> will be created.

typeClashTactic

How to handle type clashes when reading a JSON file.

header

Optional list of column names. If given, the stream will be read like an object with header being the keys.

unifyNumbers

Whether to unify the numbers that are read. true by default.


fun DataFrame.Companion.readJson(url: URL, header: List<String> = emptyList(), keyValuePaths: List<JsonPath> = emptyList(), typeClashTactic: JSON.TypeClashTactic = ARRAY_AND_VALUE_COLUMNS, unifyNumbers: Boolean = true): AnyFrame

Return

DataFrame from the given url.

Parameters

url

Where to fetch the JSON as InputStream to be converted to a DataFrame.

keyValuePaths

List of JsonPaths where instead of a ColumnGroup, a FrameColumn<NameValueProperty> will be created.

typeClashTactic

How to handle type clashes when reading a JSON file.

header

Optional list of column names. If given, the stream will be read like an object with header being the keys.

unifyNumbers

Whether to unify the numbers that are read. true by default.


fun DataRow.Companion.readJson(url: URL, header: List<String> = emptyList(), keyValuePaths: List<JsonPath> = emptyList(), typeClashTactic: JSON.TypeClashTactic = ARRAY_AND_VALUE_COLUMNS, unifyNumbers: Boolean = true): AnyRow

Return

DataRow from the given url.

Parameters

url

Where to fetch the JSON as InputStream to be converted to a DataRow.

keyValuePaths

List of JsonPaths where instead of a ColumnGroup, a FrameColumn<NameValueProperty> will be created.

typeClashTactic

How to handle type clashes when reading a JSON file.

header

Optional list of column names. If given, the stream will be read like an object with header being the keys.

unifyNumbers

Whether to unify the numbers that are read. true by default.


fun DataFrame.Companion.readJson(stream: InputStream, header: List<String> = emptyList(), keyValuePaths: List<JsonPath> = emptyList(), typeClashTactic: JSON.TypeClashTactic = ARRAY_AND_VALUE_COLUMNS, unifyNumbers: Boolean = true, format: Json = Json.Default): AnyFrame

Return

DataFrame from the given stream.

Parameters

stream

JSON as InputStream to be converted to a DataFrame.

keyValuePaths

List of JsonPaths where instead of a ColumnGroup, a FrameColumn<NameValueProperty> will be created.

typeClashTactic

How to handle type clashes when reading a JSON file.

header

Optional list of column names. If given, stream will be read like an object with header being the keys.

unifyNumbers

Whether to unify the numbers that are read. true by default.

format

Json format to use for parsing. Defaults to Json.Default.


fun DataRow.Companion.readJson(stream: InputStream, header: List<String> = emptyList(), keyValuePaths: List<JsonPath> = emptyList(), typeClashTactic: JSON.TypeClashTactic = ARRAY_AND_VALUE_COLUMNS, unifyNumbers: Boolean = true, format: Json = Json.Default): AnyRow

Return

DataRow from the given stream.

Parameters

stream

JSON as InputStream to be converted to a DataRow.

keyValuePaths

List of JsonPaths where instead of a ColumnGroup, a FrameColumn<NameValueProperty> will be created.

typeClashTactic

How to handle type clashes when reading a JSON file.

header

Optional list of column names. If given, stream will be read like an object with header being the keys.

unifyNumbers

Whether to unify the numbers that are read. true by default.

format

Json format to use for parsing. Defaults to Json.Default.