Class JsonExtensions
Inheritance
JsonExtensions
Assembly: P42.Utils.dll
Syntax
public static class JsonExtensions
Methods
|
Improve this Doc
View Source
Instantiate<T>(JsonReader)
Declaration
public static T Instantiate<T>(this JsonReader reader)
where T : IJsonReadable, new()
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
Type Parameters
|
Improve this Doc
View Source
IsSimple(Type)
Declaration
public static bool IsSimple(this Type type)
Parameters
Type |
Name |
Description |
Type |
type |
|
Returns
|
Improve this Doc
View Source
ParseBool(JsonReader)
Declaration
public static bool ParseBool(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
|
Improve this Doc
View Source
ParseDateTime(JsonReader)
Declaration
public static DateTime ParseDateTime(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
|
Improve this Doc
View Source
ParseDouble(JsonReader)
Declaration
public static double ParseDouble(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
|
Improve this Doc
View Source
ParseEnum<T>(JsonReader)
Declaration
public static T ParseEnum<T>(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
Type Parameters
|
Improve this Doc
View Source
ParseIJsonReadable<T>(JsonReader)
Declaration
public static T ParseIJsonReadable<T>(this JsonReader reader)
where T : IJsonReadable<T>, new()
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
Type Parameters
|
Improve this Doc
View Source
ParseInt(JsonReader)
Declaration
public static int ParseInt(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
|
Improve this Doc
View Source
ParseLong(JsonReader)
Declaration
public static long ParseLong(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
|
Improve this Doc
View Source
ParseNullableDouble(JsonReader)
Declaration
public static double? ParseNullableDouble(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
|
Improve this Doc
View Source
ParseSimple<T>(JsonReader)
Declaration
public static T ParseSimple<T>(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
Type Parameters
|
Improve this Doc
View Source
ParseString(JsonReader)
Declaration
public static string ParseString(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
|
Improve this Doc
View Source
ReadBool(JsonReader)
Declaration
public static bool ReadBool(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
|
Improve this Doc
View Source
ReadDateTime(JsonReader)
Declaration
public static DateTime ReadDateTime(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
|
Improve this Doc
View Source
ReadDouble(JsonReader)
Declaration
public static double ReadDouble(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
|
Improve this Doc
View Source
ReadEnum<T>(JsonReader)
Declaration
public static T ReadEnum<T>(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
Type Parameters
|
Improve this Doc
View Source
ReadIJsonReadableList<T>(JsonReader)
Declaration
public static List<T> ReadIJsonReadableList<T>(this JsonReader reader)
where T : IJsonReadable, new()
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
Type Parameters
|
Improve this Doc
View Source
ReadInt(JsonReader)
Declaration
public static int ReadInt(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
|
Improve this Doc
View Source
ReadLong(JsonReader)
Declaration
public static long ReadLong(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
|
Improve this Doc
View Source
ReadNullableDouble(JsonReader)
Declaration
public static double? ReadNullableDouble(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
|
Improve this Doc
View Source
ReadSimpleList<T>(JsonReader)
Declaration
public static List<T> ReadSimpleList<T>(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
Type Parameters
|
Improve this Doc
View Source
ReadString(JsonReader)
Declaration
public static string ReadString(this JsonReader reader)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonReader |
reader |
|
Returns
|
Improve this Doc
View Source
WriteList<T>(JsonWriter, IEnumerable<T>, Boolean)
Declaration
public static void WriteList<T>(this JsonWriter writer, IEnumerable<T> list, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
IEnumerable<T> |
list |
|
Boolean |
justValues |
|
Type Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, IJsonWriteable, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, IJsonWriteable value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Boolean, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, bool value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
Boolean |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Byte, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, byte value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
Byte |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Byte[], Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, byte[] value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
Byte[] |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Char, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, char value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
Char |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, DateTime, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, DateTime value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, DateTimeOffset, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, DateTimeOffset value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Decimal, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, decimal value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
Decimal |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Double, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, double value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
Double |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Guid, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, Guid value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
Guid |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Int16, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, short value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
Int16 |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Int32, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, int value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
Int32 |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Int64, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, long value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
Int64 |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<Boolean>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, bool? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<Byte>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, byte? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<Char>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, char? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<DateTime>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, DateTime? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<DateTimeOffset>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, DateTimeOffset? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<Decimal>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, decimal? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<Double>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, double? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<Guid>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, Guid? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<Int16>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, short? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<Int32>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, int? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<Int64>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, long? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<BigInteger>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, BigInteger? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<SByte>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, sbyte? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<Single>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, float? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<TimeSpan>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, TimeSpan? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<UInt16>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, ushort? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<UInt32>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, uint? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Nullable<UInt64>, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, ulong? value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, BigInteger, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, BigInteger value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, SByte, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, sbyte value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
SByte |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Single, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, float value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
Single |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, String, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, string value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
String |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, TimeSpan, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, TimeSpan value, bool justValues = false)
Parameters
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, UInt16, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, ushort value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
UInt16 |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, UInt32, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, uint value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
UInt32 |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, UInt64, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, ulong value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
UInt64 |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair(JsonWriter, String, Uri, Boolean)
Declaration
public static void WritePvPair(this JsonWriter writer, string name, Uri value, bool justValues = false)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|
Uri |
value |
|
Boolean |
justValues |
|
|
Improve this Doc
View Source
WritePvPair<T>(JsonWriter, String, IEnumerable<T>, Boolean)
Declaration
public static void WritePvPair<T>(this JsonWriter writer, string name, IEnumerable<T> enumerable, bool justValues = false)
Parameters
Type Parameters
|
Improve this Doc
View Source
WriteSafePropertyName(JsonWriter, String)
Declaration
public static void WriteSafePropertyName(this JsonWriter writer, string name)
Parameters
Type |
Name |
Description |
Newtonsoft.Json.JsonWriter |
writer |
|
String |
name |
|