public static final class JSONOptions.Builder extends ColumnFilterOptions.Builder<JSONOptions.Builder>
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
JSONOptions |
build() |
JSONOptions.Builder |
includeColumn(Collection<String> names)
Include one or more specific columns.
|
JSONOptions.Builder |
includeColumn(String... names)
Include one or more specific columns.
|
JSONOptions.Builder |
withCudfPruneSchema(boolean prune) |
JSONOptions.Builder |
withDayFirst(boolean dayFirst)
Whether to parse dates as DD/MM versus MM/DD
|
JSONOptions.Builder |
withExperimental(boolean isAllowed)
Should experimental features be enabled or not
|
JSONOptions.Builder |
withKeepQuotes(boolean keepQuotes)
Set whether the reader should keep quotes of string values.
|
JSONOptions.Builder |
withLeadingZeros(boolean isAllowed)
Should leading zeros on numbers be allowed or not.
|
JSONOptions.Builder |
withLineDelimiter(char delimiter) |
JSONOptions.Builder |
withLines(boolean perLine)
Whether to read the file as a json object per line
|
JSONOptions.Builder |
withMixedTypesAsStrings(boolean mixedTypesAsStrings)
Specify how to handle columns that contain mixed types.
|
JSONOptions.Builder |
withNonNumericNumbers(boolean isAllowed)
Should non-numeric numbers be allowed or not.
|
JSONOptions.Builder |
withNormalizeSingleQuotes(boolean normalizeSingleQuotes)
Should the single quotes be normalized.
|
JSONOptions.Builder |
withNormalizeWhitespace(boolean normalizeWhitespace)
Should the unquoted whitespace be removed.
|
JSONOptions.Builder |
withRecoverWithNull(boolean recoverWithNull)
Specify how to handle invalid lines when parsing json.
|
JSONOptions.Builder |
withStrictValidation(boolean isAllowed)
Should json validation be strict or not
|
JSONOptions.Builder |
withUnquotedControlChars(boolean isAllowed)
Should unquoted control chars be allowed in strings.
|
public JSONOptions.Builder withCudfPruneSchema(boolean prune)
public JSONOptions.Builder withLineDelimiter(char delimiter)
public JSONOptions.Builder withStrictValidation(boolean isAllowed)
public JSONOptions.Builder withExperimental(boolean isAllowed)
public JSONOptions.Builder withLeadingZeros(boolean isAllowed)
public JSONOptions.Builder withNonNumericNumbers(boolean isAllowed)
public JSONOptions.Builder withUnquotedControlChars(boolean isAllowed)
public JSONOptions.Builder withDayFirst(boolean dayFirst)
dayFirst
- true: DD/MM, false, MM/DDpublic JSONOptions.Builder withLines(boolean perLine)
perLine
- true: per line, false: multi-linepublic JSONOptions.Builder withRecoverWithNull(boolean recoverWithNull)
recoverWithNull
- true: return nulls, false: throw exceptionpublic JSONOptions.Builder withNormalizeSingleQuotes(boolean normalizeSingleQuotes)
public JSONOptions.Builder withNormalizeWhitespace(boolean normalizeWhitespace)
public JSONOptions.Builder withMixedTypesAsStrings(boolean mixedTypesAsStrings)
mixedTypesAsStrings
- true: return unparsed JSON, false: throw exceptionpublic JSONOptions.Builder withKeepQuotes(boolean keepQuotes)
keepQuotes
- true to keep them, else false.public JSONOptions.Builder includeColumn(String... names)
ColumnFilterOptions.Builder
includeColumn
in class ColumnFilterOptions.Builder<JSONOptions.Builder>
names
- the name of the column, or more than one if you want.public JSONOptions.Builder includeColumn(Collection<String> names)
ColumnFilterOptions.Builder
includeColumn
in class ColumnFilterOptions.Builder<JSONOptions.Builder>
names
- the name of the column, or more than one if you want.public JSONOptions build()
Copyright © 2024. All rights reserved.