pub struct JsonParserConfig {
pub update_format: JsonUpdateFormat,
pub json_flavor: JsonFlavor,
pub array: bool,
}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"}]Trait Implementations§
source§impl Clone for JsonParserConfig
impl Clone for JsonParserConfig
source§fn clone(&self) -> JsonParserConfig
fn clone(&self) -> JsonParserConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for JsonParserConfig
impl Debug for JsonParserConfig
source§impl<'de> Deserialize<'de> for JsonParserConfig
impl<'de> Deserialize<'de> for JsonParserConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Serialize for JsonParserConfig
impl Serialize for JsonParserConfig
Auto Trait Implementations§
impl Freeze for JsonParserConfig
impl RefUnwindSafe for JsonParserConfig
impl Send for JsonParserConfig
impl Sync for JsonParserConfig
impl Unpin for JsonParserConfig
impl UnwindSafe for JsonParserConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)