-
Couldn't load subscription status.
- Fork 0
JToken
JToken is the base type of all JSON Tokens. JObject and JArray are derived from this
Provides Parsers and Decoders for all JSON properties
public class JToken :
System.Collections.Generic.IEnumerable<QuickJSON.JToken>,
System.Collections.IEnumerableInheritance System.Object 🡒 JToken
Implements System.Collections.Generic.IEnumerable<JToken>, System.Collections.IEnumerable
Construct a JSON Null token (default)
public JToken();Construct a copy of another JToken
public JToken(QuickJSON.JToken other);
other JToken
Create a token
public JToken(QuickJSON.JToken.TType tokentype, object value=null, int level=0);
tokentype TType
Token type to make
value System.Object
Optional, value of token
level System.Int32
Set the level of the token in the JSON heirarchy
Get number of JArray or JObject items (of 0 for JToken)
public virtual int Count { get; }Does the object have a Value. True for bool/string/number
public bool HasValue { get; }Is the token a JSON Array
public bool IsArray { get; }Is the token a BigInt
public bool IsBigInt { get; }Is the token a Boolean
public bool IsBool { get; }Is the token a Real Number
public bool IsDouble { get; }Is the token a End Array marker
public bool IsEndArray { get; }Is the token a End Object marker
public bool IsEndObject { get; }Is the token an error token
public bool IsInError { get; }Is the token a Integer Number
public bool IsInt { get; }Is the token a Long
public bool IsLong { get; }Is the token a Null
public bool IsNull { get; }Is the token a Real or Integer Number
public bool IsNumber { get; }Is the token a JSON Object
public bool IsObject { get; }Is the token a property of an Object. Only set during Parse or ParseToken.
Compiler initialiser will not have this set
public bool IsProperty { get; }Is the token a string
public bool IsString { get; }Is the token a Unsigned Long
public bool IsULong { get; }Heirachy level, 0 onwards. Set in Parse and ParseToken only
public int Level { get; set; }Name of token found during parsing if its a property of an JSON Object, or Null if not a property.
Only set during Parse and ParseToken. Not set on an compiler initialisation.
On Parse, if the property name is empty it will be called !!!EmptyNameN!!! N is 0..
If it is a repeat of a previous name, it will be called name[N] where N = 1..
JObject [] must have unique names for all objects
On ParseToken, this will be the name in the text, irrespective or empty or repeat.
public string Name { get; set; }Normally null, set to the original name in Parse only if the name is empty or a repeat
public string OriginalName { get; set; }The parsed name, either Name or OriginalName (if the property name was empty or a repeat), set on Parse or ParseToken only
public string ParsedName { get; }Access JToken in JArray or JObject by indexer. For JArray its an integer index (0+) and for JObject its the property string key name.
Returns JToken found by indexer, or null if noRobet present, indexer out of range (JArray) or indexer is not the right type
public virtual QuickJSON.JToken this[object key] { get; set; }
key System.Object
System.NotImplementedException
Thrown if used on an non indexed object
System.ArgumentOutOfRangeException
If indexer is out of range on set (JArray)
System.InvalidCastException
If indexer is not of right type for object on set
The JToken type
public QuickJSON.JToken.TType TokenType { get; set; }Set to enable trace output on failures which are ordered to be masked during operation
public static bool TraceOutput { get; set; }Value of the token, if it has one
public object Value { get; set; }Add value of type T with this property name. Will overwrite any existing property. T must be convertable to a JToken - see JToken Implicit conversions
public virtual void Add<T>(string key, T value);
key System.String
value T
System.NotImplementedException
Thrown if used on an non indexed object
Add to a JArray a value of type T thru this class. T must be convertable to a JToken - see JToken Implicit conversions
public virtual void Add<T>(T value);
value T
System.NotImplementedException
Thrown if used on an non indexed object
Add to a JArray a JToken thru this class
public virtual void Add(QuickJSON.JToken value);
value JToken
System.NotImplementedException
Thrown if used on an non indexed object
Add a JToken with this property name thru this class. Will overwrite any existing property
public virtual void Add(string key, QuickJSON.JToken value);
key System.String
value JToken
System.NotImplementedException
Thrown if used on an non indexed object
Add a range of items of type T to a JArray thru this class. T must be convertable to a JToken - see JToken Implicit conversions
public virtual void AddRange<T>(System.Collections.Generic.IEnumerable<T> values);
values System.Collections.Generic.IEnumerable<T>
System.NotImplementedException
Thrown if used on an non indexed object
Add a range of JTokens to a JArray thru this class.
public virtual void AddRange(System.Collections.Generic.IEnumerable<QuickJSON.JToken> o);
o System.Collections.Generic.IEnumerable<JToken>
System.NotImplementedException
Thrown if used on an non indexed object
Clear JArray or JObject of items
public virtual void Clear();System.NotImplementedException
Thrown if used on an non indexed object
Clear FromObject convert cache
public static void ClearFromObjectCache();Return a copy of this JToken
public QuickJSON.JToken Clone();Does the JObject contain property name
public virtual bool Contains(string name);
name System.String
Creata a token from an object
* Will convert null, string
* Will convert bool,byte,sbyte,decimal,double,float,int,uint,long,ulong,short,ushort, DateTime and their ? types as per the implicit rules
* Will convert a Enum type to a JSON string
* Will clone a JArray or JObject
public static QuickJSON.JToken CreateToken(object obj, bool except=true);
obj System.Object
Object to make token from
except System.Boolean
True to except on error, else return null
Perform an equality test for all values in the JToken
* Doubles use an approximate equals dependent on size to find equality.
* Will compare all JToken Number types against all other JNumber types.
* JObject properties do not have to be in the same order in both tokens.
* Booleans will compare against either another boolean or an integer (!=0 is true)
public bool DeepEquals(QuickJSON.JToken other);
other JToken
JToken to compare with
System.Boolean
True if all values are the same.
Static interface to Deep Equals
public static bool DeepEquals(QuickJSON.JToken left, QuickJSON.JToken right);
left JToken
right JToken
Get the first JToken
public virtual QuickJSON.JToken First();System.NotImplementedException
Thrown if used on an non indexed object
System.ArgumentOutOfRangeException
If no items are present
Get the first JToken or null if no elements are in the list
public virtual QuickJSON.JToken FirstOrDefault();System.NotImplementedException
Thrown if used on an non indexed object
Convert Object to JToken tree
Beware of using this except for the simpliest classes, use one below and control the ignored/max recursion
public static QuickJSON.JToken FromObject(object obj);
obj System.Object
Object to convert from
JToken
JToken tree
JToken.FromObject(object, bool, Type[], int, BindingFlags, bool, string, Func<object,JToken>) Method
Convert Object to JToken tree
public static QuickJSON.JToken FromObject(object obj, bool ignoreunserialisable, System.Type[] ignored=null, int maxrecursiondepth=256, System.Reflection.BindingFlags membersearchflags=System.Reflection.BindingFlags.Instance|System.Reflection.BindingFlags.Static|System.Reflection.BindingFlags.Public, bool ignoreobjectpropertyifnull=false, string setname=null, System.Func<object,QuickJSON.JToken> customconvert=null);
obj System.Object
Object to convert from
ignoreunserialisable System.Boolean
If true, do not stop if an unserialisable member is found. These are self referencing members which would cause an infinite loop
ignored System.Type[]
List of ignored types not to serialise, may be null
maxrecursiondepth System.Int32
Maximum depth to recurse through the objects heirarchy
membersearchflags System.Reflection.BindingFlags
Member search flags, to select what types of members are serialised
ignoreobjectpropertyifnull System.Boolean
acts as per JSONIgnoreIfNull and does not output JSON object property null
setname System.String
Define set of JSON attributes to apply, null for default
customconvert System.Func<System.Object,JToken>
Use this custom converter on class members when they are marked with [JsonCustomFormat]n
JToken
Null if can't convert (error detected) or JToken tree
JToken.FromObjectWithError(object, bool, Type[], int, BindingFlags, bool, string, Func<object,JToken>) Method
Convert Object to JToken tree
public static QuickJSON.JToken FromObjectWithError(object obj, bool ignoreunserialisable, System.Type[] ignored=null, int maxrecursiondepth=256, System.Reflection.BindingFlags membersearchflags=System.Reflection.BindingFlags.Instance|System.Reflection.BindingFlags.Static|System.Reflection.BindingFlags.Public, bool ignoreobjectpropertyifnull=false, string setname=null, System.Func<object,QuickJSON.JToken> customconvert=null);
obj System.Object
Object to convert from
ignoreunserialisable System.Boolean
If true, do not stop if an unserialisable member is found. These are self referencing members which would cause an infinite loop
ignored System.Type[]
List of ignored types not to serialise, may be null
maxrecursiondepth System.Int32
Maximum depth to recurse through the objects heirarchy
membersearchflags System.Reflection.BindingFlags
Member search flags, to select what types of members are serialised
ignoreobjectpropertyifnull System.Boolean
acts as per JSONIgnoreIfNull and does not output JSON object property null
setname System.String
Define set of JSON attributes to apply, null for default
customconvert System.Func<System.Object,JToken>
Use this custom converter on class members when they are marked with [JsonCustomFormat]n
JToken
JToken error type if can't convert (check with IsInError, value has error reason) or JToken tree
Get an Enumerator for the JToken
public System.Collections.Generic.IEnumerator<QuickJSON.JToken> GetEnumerator();System.Collections.Generic.IEnumerator<JToken>
System.NotImplementedException
Thrown if used on an non indexed object
Implements GetEnumerator(), GetEnumerator()
Get the list of included attributes to output using FromObject for a particular class, given setname and member search flags
Completely ignored objects are not included
public static System.Collections.Generic.Dictionary<string,QuickJSON.JToken.MemberAttributeSettings> GetMemberAttributeSettings(System.Type tt, string setname=null, System.Reflection.BindingFlags membersearchflags=System.Reflection.BindingFlags.Instance|System.Reflection.BindingFlags.Static|System.Reflection.BindingFlags.Public);
tt System.Type
class type
setname System.String
name of set, or null
membersearchflags System.Reflection.BindingFlags
search flags to apply
System.Collections.Generic.Dictionary<System.String,MemberAttributeSettings>
Dictionary keyed by member name of all non ignored attributes
Return JSON Schema name of the object
public string GetSchemaTypeName();System.String
Schema type name or null for not json type
Get the token at the end of the path using JSONPath format.
. [] format only. Do not include $ as we do not have an absolute path.
https://support.smartbear.com/alertsite/docs/monitors/api/endpoint/jsonpath.html
public QuickJSON.JToken GetToken(string path);
path System.String
Path to the token
Get the token at the end of the path using schema format
objectname/objectname only. Do not include #/ as we do not have an absolute path.
public QuickJSON.JToken GetTokenSchemaPath(string path);
path System.String
Path to the token
If the parsed name is empty or a repeat, it will be given a synthetic name.
public static bool IsKeyNameSynthetic(string name);
name System.String
Get the last JToken
public virtual QuickJSON.JToken Last();System.NotImplementedException
Thrown if used on an non indexed object
System.ArgumentOutOfRangeException
If no items are present
Get the last JToken or null if no elements are in the list
public virtual QuickJSON.JToken LastOrDefault();System.NotImplementedException
Thrown if used on an non indexed object
Read the token stream at the current heirarchy level into the current enumerator JToken
public static bool LoadTokens(System.Collections.Generic.IEnumerator<QuickJSON.JToken> enumerator);
enumerator System.Collections.Generic.IEnumerator<JToken>
Current enumerator position. Will load the item at the enumerator will all fields found and then stop
System.Boolean
true if loaded correctly
Creates a Null JToken
public static QuickJSON.JToken Null();Parse JSON text and produce a JToken tree. This is the lowest level parser allowing a buffer to be fed into it
Note any empty name properties will be names !!!EmptyNameN!!! to make them unique and searchable
Note any repeat name properties will be names !!!Repeat-Name[repeatnumber] make them unique and searchable
public static QuickJSON.JToken Parse(QuickJSON.Utils.IStringParserQuick parser, out string error, QuickJSON.JToken.ParseOptions flags, char[] textbuffer, int stackdepth);
parser IStringParserQuick
A string parser based on IStringParserQuick
error System.String
Null on success, or error text
flags ParseOptions
Parser flags
textbuffer System.Char[]
Buffer to store JSON elements in
stackdepth System.Int32
Maximum depth of objects allowed in JSON
JToken
JToken tree or null on error
JsonException
On error, and flags indicate throw on error, exception is thrown with the exception holding the reason
Parse JSON text and produce a JToken tree
public static QuickJSON.JToken Parse(QuickJSON.Utils.IStringParserQuick parser, out string error, QuickJSON.JToken.ParseOptions flags, int charbufsize, int stackdepth);
parser IStringParserQuick
A string parser based on IStringParserQuick
error System.String
Null on success, or error text
flags ParseOptions
Parser flags
charbufsize System.Int32
Maximum length of a JSON element
stackdepth System.Int32
Maximum depth of objects allowed in JSON
JToken
JToken tree or null on error
JsonException
On error, and flags indicate throw on error, exception is thrown with the exception holding the reason
Parse JSON text and produce a JToken tree
public static QuickJSON.JToken Parse(string text, QuickJSON.JToken.ParseOptions flags=QuickJSON.JToken.ParseOptions.None);
text System.String
Text to parse
flags ParseOptions
Parser flags
JToken
Null on error, or JToken tree
JsonException
On error, and flags indicate throw on error, exception is thrown with the exception holding the reason
Parse JSON text and produce a JToken tree
public static QuickJSON.JToken Parse(string text, out string error, QuickJSON.JToken.ParseOptions flags=QuickJSON.JToken.ParseOptions.None);
text System.String
Text to parse
error System.String
Null on success, or error text
flags ParseOptions
Parser flags
JToken
JToken tree or null on error
JsonException
On error, and flags indicate throw on error, exception is thrown with the exception holding the reason
Parse JSON text and produce a JToken tree
public static QuickJSON.JToken Parse(System.IO.TextReader trx, out string error, QuickJSON.JToken.ParseOptions flags=QuickJSON.JToken.ParseOptions.None, int chunksize=16384, int charbufsize=16384);
trx System.IO.TextReader
Text reader to read the text from
error System.String
Null on success, or error text
flags ParseOptions
Parser flags
chunksize System.Int32
Text reader chunk buffer size, bigger the better
charbufsize System.Int32
Maximum length of a JSON element
JToken
JToken tree or null on error
JsonException
On error, and flags indicate throw on error, exception is thrown with the exception holding the reason
Parse JSON text and produce a JToken tree. Throw a exception on error
public static QuickJSON.JToken ParseThrow(string text, QuickJSON.JToken.ParseOptions flags=QuickJSON.JToken.ParseOptions.None);
text System.String
Text to parse
flags ParseOptions
Parser flags
JToken
JToken tree
JsonException
On error exception is thrown with the exception holding the reason
Parse JSON text and produce a JToken tree.
Parse flags are AllowTrailingCommas | CheckEOL | ThrowOnError
public static QuickJSON.JToken ParseThrowCommaEOL(string text);
text System.String
Text to parse
JToken
JToken tree
JsonException
On error exception is thrown with the exception holding the reason
Read a token string and return one by one the JTokens.
Will return JToken EndArray and JToken EndObject to indicate end of those objects
public static System.Collections.Generic.IEnumerable<QuickJSON.JToken> ParseToken(QuickJSON.Utils.IStringParserQuick parser, QuickJSON.JToken.ParseOptions flags=QuickJSON.JToken.ParseOptions.None, int charbufsize=16384);
parser IStringParserQuick
A string parser based on IStringParserQuick
flags ParseOptions
JSON Parser flags
charbufsize System.Int32
Maximum length of a JSON element
System.Collections.Generic.IEnumerable<JToken>
Next token, or Null at end of text
TokenException
Exception when token reader fails
Read a token string and return one by one the JTokens.
Will return JToken EndArray and JToken EndObject to indicate end of those objects
public static System.Collections.Generic.IEnumerable<QuickJSON.JToken> ParseToken(System.IO.TextReader tr, QuickJSON.JToken.ParseOptions flags=QuickJSON.JToken.ParseOptions.None, int charbufsize=16384);
tr System.IO.TextReader
A text reader to get the text from
flags ParseOptions
JSON Parser flags
charbufsize System.Int32
Maximum length of a JSON element
System.Collections.Generic.IEnumerable<JToken>
Next token, or Null at end of text
TokenException
Exception when token reader fails
Convert to string default settings
public override string ToString();System.String
JSON string representation
Convert to string
public string ToString(bool verbose=false, string oapad=" ");
verbose System.Boolean
If verbose, pad the structure out
oapad System.String
Pad before objects or arrays are outputted (only for verbose=true) mode
System.String
JSON string representation
Convert to string
public static string ToString(QuickJSON.JToken token, string prepad, string postpad, string oapad, bool stringliterals, int linelength=int.MaxValue);
token JToken
Token to convert
prepad System.String
Pad before token is outputted
postpad System.String
Pad after token is outputted
oapad System.String
Pad before objects or arrays are outputted
stringliterals System.Boolean
true to output strings or keys without escaping or quoting
linelength System.Int32
introduce new line between entries when exceeded this length. If postpad = \r\n don't use
System.String
JSON string representation
Convert to string with ability to control the array/output pad
public string ToString(string oapad);
oapad System.String
Pad before objects or arrays are outputted
System.String
JSON string representation
Convert to string
public string ToString(string prepad, string postpad, string oapad, bool stringliterals, int linelength=int.MaxValue);
prepad System.String
Pad before token is outputted
postpad System.String
Pad after token is outputted
oapad System.String
Pad before objects or arrays are outputted
stringliterals System.Boolean
true to output strings or keys without escaping or quoting
linelength System.Int32
introduce new line between entries when exceeded this length. If postpad = \r\n don't use
System.String
JSON string representation
Convert to string using string builder
public static void ToStringBuilder(System.Text.StringBuilder str, QuickJSON.JToken token, string prepad, string postpad, string oapad, bool stringliterals);
str System.Text.StringBuilder
Stringbuilder to append to
token JToken
Token to convert
prepad System.String
Pad before token is outputted
postpad System.String
Pad after token is outputted
oapad System.String
Pad before objects or arrays are outputted
stringliterals System.Boolean
true to output strings and key names without escaping or quoting
Convert to string using string builder
public static void ToStringBuilder(System.Text.StringBuilder str, QuickJSON.JToken token, string prepad, string postpad, string oapad, bool stringliterals, ref int lastcr, int maxlinelength);
str System.Text.StringBuilder
Stringbuilder to append to
token JToken
Token to convert
prepad System.String
Pad before token is outputted
postpad System.String
Pad after token is outputted
oapad System.String
Pad before objects or arrays are outputted
stringliterals System.Boolean
true to output strings and key names without escaping or quoting
lastcr System.Int32
where last cr is. set to 0 to start
maxlinelength System.Int32
introduce new line between entries when exceeded this length
Convert to string with strings themselves being unquoted or escaped.
Useful for data extraction purposes
public string ToStringLiteral();System.String
JSON string representation
Is this token equal to another tokens value. Only for object types of string, int, uint, long, ulong, bool
public bool ValueEquals(object value);
value System.Object
Is this token equal to another tokens. For types incl double
public bool ValueEquals(QuickJSON.JToken other);
other JToken
Explicit conversion of a JSON Token Boolean or Long to a bool.
public static bool explicit operator bool(QuickJSON.JToken tk);
tk JToken
System.InvalidOperationException
If JToken is not of the right type
Explicit conversion of a JSON Token Unsigned Long, Long, BigInt or Double to a double.
public static double explicit operator double(QuickJSON.JToken tk);
tk JToken
System.InvalidOperationException
If JToken is not of the right type
Explicit conversion of a JSON Token Unsigned Long, Long, BigInt or Double to an float.
public static float explicit operator float(QuickJSON.JToken tk);
tk JToken
System.InvalidOperationException
If JToken is not of the right type
Explicit conversion of a JSON Token Long or Double to an int.
public static int explicit operator int(QuickJSON.JToken tk);
tk JToken
System.InvalidOperationException
If JToken is not a Long or Double
Explicit conversion of a JSON Token Long or Double to a long.
public static long explicit operator long(QuickJSON.JToken tk);
tk JToken
System.InvalidOperationException
If JToken is not a Long or Double
Explicit conversion of a JSON Token Null or String to a string. Return null if JToken is not a Null or String
public static string explicit operator string(QuickJSON.JToken tk);
tk JToken
Explicit conversion of a JSON Token String to a date, assuming UTC. Return MinValue if JToken is not of the right type or date conversion fails
public static System.DateTime explicit operator DateTime(QuickJSON.JToken t);
t JToken
Explicit conversion of a JSON Token Boolean or Long to a bool.
Both true/false and integers (0=false, otherwise true) are acceptable
Return null if JToken is not of the right type
public static System.Nullable<bool> explicit operator Nullable<bool>(QuickJSON.JToken tk);
tk JToken
System.Nullable<System.Boolean>
Explicit conversion of a JSON Token Long, Unsigned Long, BigInt or Double to a double?. Return null if JToken is not of the right type
public static System.Nullable<double> explicit operator Nullable<double>(QuickJSON.JToken tk);
tk JToken
System.Nullable<System.Double>
Explicit conversion of a JSON Token Long, Unsigned Long, BigInt or Double to a float?. Return null if JToken is not of the right type
public static System.Nullable<float> explicit operator Nullable<float>(QuickJSON.JToken tk);
tk JToken
System.Nullable<System.Single>
Explicit conversion of a JSON Token Long or Double to an int?. Return null if JToken is not a Long or Double
public static System.Nullable<int> explicit operator Nullable<int>(QuickJSON.JToken tk);
tk JToken
Explicit conversion of a JSON Token Long or Double to a long?. Return null if JToken is not a Long or Double
public static System.Nullable<long> explicit operator Nullable<long>(QuickJSON.JToken tk);
tk JToken
Explicit conversion of a JSON Token Long or Double to an uint?. Return null if JToken is not a Long or Double or negative
public static System.Nullable<uint> explicit operator Nullable<uint>(QuickJSON.JToken tk);
tk JToken
System.Nullable<System.UInt32>
Explicit conversion of a JSON Token Unsigned Long, Long or Double to an unsigned long?. Return null if JToken is not a Long or Double or negative
public static System.Nullable<ulong> explicit operator Nullable<ulong>(QuickJSON.JToken tk);
tk JToken
System.Nullable<System.UInt64>
Explicit conversion of a JSON Token Long or Double to an unsigned int.
public static uint explicit operator uint(QuickJSON.JToken tk);
tk JToken
System.InvalidOperationException
If JToken is not a Long or Double or negative.
Explicit conversion of a JSON Token Unsigned Long, Long or Double to an unsigned long.
public static ulong explicit operator ulong(QuickJSON.JToken tk);
tk JToken
System.InvalidOperationException
If JToken is not of the right type or negative
Implicit conversion of a bool to a JSON token of the type Bool
public static QuickJSON.JToken implicit operator JToken(bool v);Implicit conversion of a byte to a JSON token of the type Long
public static QuickJSON.JToken implicit operator JToken(byte v);Implicit conversion of a character to a JSON token of the type String
public static QuickJSON.JToken implicit operator JToken(char v);Implicit conversion of a decimal to a JSON token of the type Long
public static QuickJSON.JToken implicit operator JToken(decimal v);Implicit conversion of a double to a JSON token of the type Double
public static QuickJSON.JToken implicit operator JToken(double v);Implicit conversion of a float to a JSON token of the type Double
public static QuickJSON.JToken implicit operator JToken(float v);Implicit conversion of a int to a JSON token of the type Long
public static QuickJSON.JToken implicit operator JToken(int v);Implicit conversion of a long to a JSON token of the type Long
public static QuickJSON.JToken implicit operator JToken(long v);Implicit conversion of a sbyte to a JSON token of the type Long
public static QuickJSON.JToken implicit operator JToken(sbyte v);Implicit conversion of a short to a JSON token of the type Long
public static QuickJSON.JToken implicit operator JToken(short v);Implicit conversion of a string to a JSON token of the type String
public static QuickJSON.JToken implicit operator JToken(string v);Implicit conversion of a DateTime to a JSON token of the type String.
In the zulu format yyyy-mm-ddThh-mm-ssZ or yyyy-mm-ddThh-mm-ss.fffZ
public static QuickJSON.JToken implicit operator JToken(System.DateTime v);Implicit conversion of a unsigned int to a JSON token of the type Long
public static QuickJSON.JToken implicit operator JToken(uint v);Implicit conversion of a ulong to a JSON token of the type Unsigned Long
public static QuickJSON.JToken implicit operator JToken(ulong v);Implicit conversion of a unsigned short to a JSON token of the type Long
public static QuickJSON.JToken implicit operator JToken(ushort v);Get a IEnumerator for the JToken
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator();System.NotImplementedException
Thrown if used on an non indexed object
Implements GetEnumerator()
| Classes | |
|---|---|
| JToken.JsonException | Exception Class for JSON Parsers. Holds Error string |
| JToken.MemberAttributeSettings | Holds the attribute settings found - used in FromObject |
| JToken.TokenException | Exception when the token reader fails |
Parse options for QuickJSON Parser
public enum JToken.ParseOptions
AllowTrailingCommas 1
Allow a extra trailing comma after the end of an object or array list
CheckEOL 2
Error if extra text is present beyond the end of the JSON Token stream
IgnoreBadArrayValue 16
Ignore a bad array value, the array entry will be replaced with a null. Try and resynchronise with the token stream
IgnoreBadObjectValue 8
Ignore a bad object value, and try and resynchronise with the token stream
ThrowOnError 4
Throw a JsonException if an error is encountered. If not, null will be returned
Token Type
public enum JToken.TType
EndArray 10
For token reading only, an EndArray ']' token
EndObject 9
For token reading only, an EndObject '}' token
Error 11
In FromObject, an error has occurred. Value holds error string