Encapsulates a JSON value (e.g. a boolean, a number, a string, a list, a dictionary, etc.)
void | |
Add the specified item to the current list if it is a JsonList; otherwise,
throws. |
void | |
Adds the specified key/value pair to the dictionary if this is a JsonDict; otherwise, throws. |
void | |
Add the specified items to the current dictionary if it is a JsonDict;
otherwise, throws. |
void | |
Add the specified items to the current list if it is a JsonList; otherwise,
throws. |
void | |
Converts the current JSON value to a JSON void that parses back to this value and places the string into the
specified StringBuilder. |
void | |
Removes all items from the current value if it is a JsonList or JsonDict;
otherwise, throws. |
bool | |
Determines whether the specified item is contained in the current list if it is a JsonList; otherwise, throws. |
bool | |
Determines whether an entry with the specified key exists in the dictionary if this is a
JsonDict; otherwise, throws. |
void | CopyTo(JsonValue[] array, int arrayIndex) |
Copies the entire list to a compatible one-dimensional array, starting at the specified
arrayIndex of the target array, if this is a JsonList; otherwise, throws. |
bool | |
Determines whether this value is equal to the other value. (See also remarks in the other
overload, JsonValue.Equals(JsonValue).) |
bool | |
Determines whether this value is equal to the other value. (See also remarks.) |
bool | | Converts the current value to a bool . Throws if the conversion is not valid. |
bool | |
Converts the current value to a bool by using the BoolConversionOptions.Lenient option.
Throws if the conversion is not valid. |
bool? | |
Converts the current value to a bool by using the BoolConversionOptions.Lenient option.
Returns null if the conversion is not valid. |
bool? | | Converts the current value to a bool . Returns null if the conversion is not valid. |
decimal | | Converts the current value to a decimal . Throws if the conversion is not valid. |
decimal | |
Converts the current value to a decimal by using the NumericConversionOptions.Lenient
option. Throws if the conversion is not valid. |
decimal? | |
Converts the current value to a decimal by using the NumericConversionOptions.Lenient
option. Returns null if the conversion is not valid. |
decimal? | | Converts the current value to a decimal . Returns null if the conversion is not valid. |
JsonDict | |
Converts the current value to JsonDict if it is a JsonDict; otherwise, throws. |
JsonDict | |
Converts the current value to JsonDict if it is a JsonDict; otherwise, returns
null. |
double | | Converts the current value to a double . Throws if the conversion is not valid. |
double | |
Converts the current value to a double by using the NumericConversionOptions.Lenient
option. Throws if the conversion is not valid. |
double? | |
Converts the current value to a double by using the NumericConversionOptions.Lenient
option. Returns null if the conversion is not valid. |
double? | | Converts the current value to a double . Returns null if the conversion is not valid. |
int | | Returns a hash code representing this object. |
int | | Converts the current value to an int . Throws if the conversion is not valid. |
int | |
Converts the current value to an int by using the NumericConversionOptions.Lenient
option. Throws if the conversion is not valid. |
int? | |
Converts the current value to an int by using the NumericConversionOptions.Lenient
option. Returns null if the conversion is not valid. |
int? | | Converts the current value to an int . Returns null if the conversion is not valid. |
JsonList | |
Converts the current value to JsonList if it is a JsonList; otherwise, throws. |
JsonList | |
Converts the current value to JsonList if it is a JsonList; otherwise, returns
null. |
long | | Converts the current value to a long . Throws if the conversion is not valid. |
long | |
Converts the current value to a long by using the NumericConversionOptions.Lenient
option. Throws if the conversion is not valid. |
long? | |
Converts the current value to a long by using the NumericConversionOptions.Lenient
option. Returns null if the conversion is not valid. |
long? | | Converts the current value to a long . Returns null if the conversion is not valid. |
string | | Converts the current value to a string . Throws if the conversion is not valid. |
string | |
Converts the current value to a string by using the StringConversionOptions.Lenient
option. Throws if the conversion is not valid. |
string | |
Converts the current value to a string by using the StringConversionOptions.Lenient
option. Returns null if the conversion is not valid. |
string | | Converts the current value to a string . Returns null if the conversion is not valid. |
ulong | | Converts the current value to a ulong . Throws if the conversion is not valid. |
ulong | |
Converts the current value to a ulong by using the NumericConversionOptions.Lenient
option. Throws if the conversion is not valid. |
ulong? | |
Converts the current value to a ulong by using the NumericConversionOptions.Lenient
option. Returns null if the conversion is not valid. |
ulong? | | Converts the current value to a ulong . Returns null if the conversion is not valid. |
int | |
Returns the index of the first occurrence of the specified item within the current list if
it is a JsonList; otherwise, throws. |
void | |
Inserts the specified item at the specified index to the current list if
it is a JsonList; otherwise, throws. |
bool | |
Removes the entry with the specified key from the dictionary if this is a JsonDict; otherwise, throws. |
bool | |
Removes the first instance of the specified item from the current list if it is a JsonList; otherwise, throws. |
void | |
Removes the item at the specified index from the current list if it is a JsonList; otherwise, throws. |
IEnumerable<string> | | Lazy-converts the current JSON value to a JSON string that parses back to this value. |
string | | Converts the current JSON value to a JSON string that parses back to this value. |
string | |
bool | |
Attempts to retrieve the value associated with the specified key if this is a JsonDict; otherwise, throws. |
void | |
Converts the JSON value to a JSON string that parses back to this value and places the string into the
specified StringBuilder. Supports null values. |
string | Fmt(string js, params JsonValue[] namevalues) |
Formats JSON values into a piece of JavaScript code and then removes almost all unnecessary whitespace and
comments. Values are referenced by names; placeholders for these values are written as {{name}}. Placeholders
are only replaced outside of JavaScript literal strings and regexes. JsonRaw instances are
inserted unmodified. |
JsonValue | Parse(string jsonValue, bool allowJavaScript = false) |
Parses the specified string into a JSON value. |
IEnumerable<string> | | Lazy-converts the JSON value to a JSON string that parses back to this value. Supports null values. |
string | | Converts the JSON value to a JSON string that parses back to this value. Supports null values. |
string | |
bool | |
Attempts to parse the specified string into a JSON value. |