Class JsonConvert
- Namespace
- nanoFramework.Json
- Assembly
- nanoFramework.Json.dll
Provides methods for converting between .NET types and JSON types.
public static class JsonConvert
- Inheritance
-
JsonConvert
- Inherited Members
Methods
DeserializeObject(Stream, Type)
Deserializes a Json string into an object.
public static object DeserializeObject(Stream stream, Type type)
Parameters
Returns
DeserializeObject(StreamReader, Type)
Deserializes a Json string into an object.
public static object DeserializeObject(StreamReader dr, Type type)
Parameters
dr
StreamReadertype
TypeThe object type to convert to
Returns
DeserializeObject(string, Type)
Deserializes a Json string into an object.
public static object DeserializeObject(string sourceString, Type type)
Parameters
Returns
SerializeObject(object)
Convert an object to a JSON string.
public static string SerializeObject(object oSource)
Parameters
oSource
objectThe value to convert. Supported types are: Boolean, String, Byte, (U)Int16, (U)Int32, Float, Double, Decimal, Array, IDictionary, IEnumerable, Guid, Datetime, DictionaryEntry, Object and null.
Returns
- string
The JSON object as a string or null when the value type is not supported.
Remarks
For objects, only public properties with getters are converted.