pub struct JsonParserConfig {
pub update_format: JsonUpdateFormat,
pub json_flavor: JsonFlavor,
pub array: bool,
pub lines: JsonLines,
}Expand description
JSON parser configuration.
Describes the shape of an input JSON stream.
§Examples
A configuration with update_format="raw" and array=false
is used to parse a stream of JSON objects without any envelope
that get inserted in the input table.
{"b": false, "i": 100, "s": "foo"}
{"b": true, "i": 5, "s": "bar"}A configuration with update_format="insert_delete" and
array=false is used to parse a stream of JSON data change events
in the insert/delete format:
{"delete": {"b": false, "i": 15, "s": ""}}
{"insert": {"b": false, "i": 100, "s": "foo"}}A configuration with update_format="insert_delete" and
array=true is used to parse a stream of JSON arrays
where each array contains multiple data change events in
the insert/delete format.
[{"insert": {"b": true, "i": 0}}, {"delete": {"b": false, "i": 100, "s": "foo"}}]Fields§
§update_format: JsonUpdateFormatJSON update format.
json_flavor: JsonFlavorSpecifies JSON encoding used for individual table records.
array: boolSet to true if updates in this stream are packaged into JSON arrays.
§Example
[{"b": true, "i": 0},{"b": false, "i": 100, "s": "foo"}]lines: JsonLinesWhether JSON elements can span multiple lines.
This only affects JSON input.
Trait Implementations§
Source§impl Clone for JsonParserConfig
impl Clone for JsonParserConfig
Source§fn clone(&self) -> JsonParserConfig
fn clone(&self) -> JsonParserConfig
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read more