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§
Structs§
- Json
Context - Context for JSON encoding/decoding that tracks the current key path.
- Json
Settings - JSON2 settings stored in column schema metadata and represented through Arrow extension metadata.
- Json
Type Hint - 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