Class JsonLite
Contains methods for serializing/deserializing System.Json.JsonValue instances.
Inheritance
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class JsonLite : object
Methods
Deserialize(String)
Deserializes a JsonValue instance from a JSON string.
Declaration
public static JsonValue Deserialize(string json)
Parameters
Type | Name | Description |
---|---|---|
System.String | json | The JsonValue instance serialized as a JSON string. |
Returns
Type | Description |
---|---|
JsonValue | The deserialized JsonValue instance. |
DeserializeArray(String)
Deserializes a JsonArray instance from a JSON string.
Declaration
public static JsonArray DeserializeArray(string json)
Parameters
Type | Name | Description |
---|---|---|
System.String | json | The JsonArray instance serialized as a JSON string. |
Returns
Type | Description |
---|---|
JsonArray | The deserialized JsonArray instance. |
DeserializeObject(String)
Deserializes a JsonObject instance from a JSON string.
Declaration
public static JsonObject DeserializeObject(string json)
Parameters
Type | Name | Description |
---|---|---|
System.String | json | The JsonObject instance serialized as a JSON string. |
Returns
Type | Description |
---|---|
JsonObject | The deserialized JsonObject instance. |
DeserializePrimitive(String)
Deserializes a JsonPrimitive instance from a JSON string.
Declaration
public static JsonPrimitive DeserializePrimitive(string json)
Parameters
Type | Name | Description |
---|---|---|
System.String | json | The JsonPrimitive instance serialized as a JSON string. |
Returns
Type | Description |
---|---|
JsonPrimitive | The deserialized JsonPrimitive instance. |
Serialize(JsonValue)
Serializes a JsonValue instance to a JSON string.
Declaration
public static string Serialize(JsonValue value)
Parameters
Type | Name | Description |
---|---|---|
JsonValue | value | The JsonValue instance. |
Returns
Type | Description |
---|---|
System.String | The JsonValue instance serialized as a JSON string. |