encoding.json Package
Function Description
The json package is used to process JSON data and implement conversion among String, JsonValue, and DataModel.
JsonValue is the encapsulation of the JSON data format, including object, array, string, number, true, false, and null.
For details about the DataModel, see serialization Package Document.
For details about the JSON syntax rules, see Introduction to JSON.
For details about the JSON data conversion standards, see ECMA-404 The JSON Data Interchange Standard.
API List
Interface
Name | Description |
---|---|
ToJson | Implements conversion between JsonValue and DataModel. |
Class
Name | Description |
---|---|
JsonArray | Creates an empty JsonArray. |
JsonBool | Encapsulates a specified Bool instance into a JsonBool instance. |
JsonFloat | Encapsulates a specified Float64 instance into a JsonFloat instance. |
JsonInt | Encapsulates a specified Int64 instance into a JsonInt instance. |
JsonNull | Converts a JsonNull instance into a string. |
JsonObject | Creates an empty JsonObject instance. |
JsonString | Encapsulates a specified String instance into a JsonString instance. |
JsonValue | Specifies the JSON data layer and converts data between JsonValue and String. |
Enumeration
Name | Description |
---|---|
JsonKind | Indicates a type of JsonValue. |
Exception Class
Name | Description |
---|---|
JsonException | Used in the scenario where an exception occurs when the JsonValue type is used. |