Class JsonExtentions
- Namespace
- JobFlow.Core.Infrastructure.Json
- Assembly
- JobFlow.Core.dll
public static class JsonExtentions
- Inheritance
-
JsonExtentions
Methods
EnumerateJsonStream<T>(Stream)
Enumerate a JSON text Stream and deserialize JSON objects.
public static IEnumerable<T> EnumerateJsonStream<T>(this Stream stream)
Parameters
stream
Stream
Returns
- IEnumerable<T>
Type Parameters
T
FromJsonStream<T>(Stream)
Deserialize a JSON text Stream to an object.
public static T FromJsonStream<T>(this Stream stream)
Parameters
stream
Stream
Returns
- T
Type Parameters
T
FromJsonString<T>(string)
Deserialize a JSON string to an object.
public static T FromJsonString<T>(this string json)
Parameters
json
string
Returns
- T
Type Parameters
T
ToJObject<T>(T)
Serialize any object to a JObject.
public static JObject ToJObject<T>(this T obj)
Parameters
obj
T
Returns
- JObject
Type Parameters
T
ToJsonBytes<T>(T)
Serialize any object to a JSON byte array.
public static byte[] ToJsonBytes<T>(this T obj)
Parameters
obj
T
Returns
- byte[]
Type Parameters
T
ToJsonString<T>(T)
Serialize any object to a JSON string.
public static string ToJsonString<T>(this T obj)
Parameters
obj
T
Returns
Type Parameters
T