Class JsonLite
Contains methods for serializing/deserializing System.Json.JsonValue instances.
Inheritance
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class JsonLite
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 |
---|---|
System.Json.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 |
---|---|
System.Json.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 |
---|---|
System.Json.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 |
---|---|
System.Json.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 |
---|---|---|
System.Json.JsonValue | value | The JsonValue instance. |
Returns
Type | Description |
---|---|
System.String | The JsonValue instance serialized as a JSON string. |