public class JsonLoaderOptions extends JsonStructureOptions
JsonStructureOptions
class, which provides
JSON syntactic options, with a number of semantic options enforced
at the JSON loader level.Modifier and Type | Field and Description |
---|---|
boolean |
allTextMode
JSON returns values as typed tokens.
|
boolean |
classicArrayNulls
Drill prior to version 1.18 would read a null string
array element as the string "null".
|
boolean |
enableExtendedTypes
Enable support for Mongo-style extended types:
{ field: { "$type": value }, ... |
TypeProtos.MinorType |
nullType
Type to use for a field which contains all nulls, or all empty
arrays.
|
boolean |
readNumbersAsDouble
Forces all numbers to be double, even if the first number that
appears is an integer.
|
boolean |
unionEnabled |
boolean |
unknownsAsJson
If a field contains all nulls, all empty arrays, or the first
non-empty array contains a null ({@code [ null, ...
|
allowNanInf, enableEscapeAnyChar, skipMalformedDocument, skipMalformedRecords, skipOuterList
Constructor and Description |
---|
JsonLoaderOptions() |
JsonLoaderOptions(OptionSet options) |
public boolean allTextMode
allTextMode
is
set, the structure parser converts all scalars (except null
)
to text and forwards the values to the listener as text.
Implements Drill's "all-text mode" for JSON.public boolean readNumbersAsDouble
public boolean unionEnabled
public boolean classicArrayNulls
For {a: [null]}
public boolean unknownsAsJson
[ null, ... ]
, then the
default action is to read the column as JSON: literally convert
the values (of any JSON complexity) to JSON string of that structure.
If false
, then uses the default type.public TypeProtos.MinorType nullType
null
value, if unknownsAsJson
is false
.public boolean enableExtendedTypes
{ field: { "$type": value }, ... }
public JsonLoaderOptions()
public JsonLoaderOptions(OptionSet options)
Copyright © 1970 The Apache Software Foundation. All rights reserved.