Skip to main content

Module json

Module json 

Source
Expand description

Data conversion between greptime’s StructType and Json

The idea of this module is to provide utilities to convert serde_json::Value to greptime’s StructType and vice versa.

The struct will carry all the fields of the Json object. We will not flatten any json object in this implementation.

Modules§

value

Structs§

JsonContext
Context for JSON encoding/decoding that tracks the current key path.
JsonSettings
JSON2 settings stored in column schema metadata and represented through Arrow extension metadata.
JsonTypeHint
Declares selected JSON2 subpaths as typed fields.

Functions§

apply_missing_type_hints 🔒
decode_list_with_context 🔒
Decode a list value to JSON array
decode_primitive_value 🔒
Decode primitive value to JSON
decode_struct_with_context 🔒
Decode a structured value to JSON object
decode_value_with_context
Main decoding function with key path tracking
encode_json_array_with_context 🔒
encode_json_object_with_context 🔒
encode_json_value_with_context 🔒
Helper function to encode a JSON value to a Value and determine its ConcreteDataType with context
encode_json_value_with_hint 🔒
encode_json_with_context
Main encoding function with key path tracking
encode_missing_type_hint_value 🔒
insert_missing_type_hint 🔒