encoding.json.stream Package
Function Description
The json.stream package is used for conversion between Cangjie objects and JSON data streams.
This package provides the JsonWriter and JsonReader classes. The JsonWriter class provides the serialization capability for converting Cangjie objects into JSON data streams. The JsonReader class provides the deserialization capability for converting JSON data streams into Cangjie objects.
Currently, the following types support the conversion with JSON data streams:
-
Basic data types: String, Int8, Int16, Int32, Int64, Float16, Float32, Float64, UInt8, UInt16, UInt32, and UInt64
-
Set type: Array<T>, ArrayList<T>, and HashMap<String, T>
-
Other types: Option<T>, BigInt, and Decimal
API List
Interface
Name | Description |
---|---|
JsonDeserializable<T> | Reads a Cangjie object from JsonReader. |
JsonSerializable | Provides an interface for serializing a type to a JSON data stream. |
Class
Name | Description |
---|---|
JsonReader | Provides the deserialization capability for converting a JSON data stream into a Cangjie object. |
JsonWriter | Provides the capability of serializing a Cangjie object to a JSON data stream. |
Enumeration
Name | Description |
---|---|
JsonToken | Indicates the structure, name, or value type in a JSON-encoded string. |
Struct
Name | Description |
---|---|
WriteConfig | Indicates the serialization format of JsonWriter. |