Menu

JSONValue

Elvedin Hamzagic

Represents any JSON value of type boolean, number, string, array, object, or null.
It is a wrapper class that implements implicit typecasts, and helps representing any value as single type.

  • Contructors
Definition Description
public JSONValue(JSONValue data) Creates JSONValue instance and assign value from specified JSONValue to it.
public JSONValue(Object data) Creates JSONValue instance and assign specified Object to it.
  • Properties
Definition Description
public static Char DecimalSeparator Gets or sets decimal separator character, which .NET uses when converting from String to Decimal and vice versa. It depends on your regional settings. Use it when you have a problem with conversion of Decimal type. Default value is '.'.
public Object Value Gets or sets the Object that this instance of JSONValue refers to.
public JSONValue this[String key] If this instance of JSONValue refers to an JSONObject, then this property is the same as equivalent JSONObject property, otherwise it does nothing and returns null.
public JSONValue this[int key] If this instance of JSONValue refers to an JSONArray, then this property is the same as equivalent JSONArray property, otherwise it does nothing and returns null.
  • Methods
Definition Description
public override String ToString() Overrides ToString method and returns JSON string representation of this instance.
public static JSONValue Parse(String data) Parses JSON string and returns newly created JSONValue instance, or null if input string is not a valid JSON. Returned JSONValue can reference any type, depending of input string.
  • Operators
Definition Description
public static implicit operator String(JSONValue data) Returns newly created String object by converting referenced object to String, or null if specified JSONValue or it's referenced object is null, anytime when doing typecast from JSONValue to String.
public static implicit operator Boolean(JSONValue data) Returns newly created Boolean object by converting referenced object to Boolean, anytime when doing typecast from JSONValue to Boolean. If JSONValue or it's referenced object is null a NullReferenceException will be thrown.
public static implicit operator Char(JSONValue data) Returns newly created Char object by converting referenced object to Char, anytime when doing typecast from JSONValue to Char. If JSONValue or it's referenced object is null a NullReferenceException will be thrown.
public static implicit operator Byte(JSONValue data) Returns newly created Byte object by converting referenced object to Byte, anytime when doing typecast from JSONValue to Byte. If JSONValue or it's referenced object is null a NullReferenceException will be thrown.
public static implicit operator Int16(JSONValue data) Returns newly created Int16 object by converting referenced object to Int16, anytime when doing typecast from JSONValue to Int16. If JSONValue or it's referenced object is null a NullReferenceException will be thrown.
public static implicit operator UInt16(JSONValue data) Returns newly created UInt16 object by converting referenced object to UInt16, anytime when doing typecast from JSONValue to UInt16. If JSONValue or it's referenced object is null a NullReferenceException will be thrown.
public static implicit operator Int32(JSONValue data) Returns newly created Int32 object by converting referenced object to Int32, anytime when doing typecast from JSONValue to Int32. If JSONValue or it's referenced object is null a NullReferenceException will be thrown.
public static implicit operator UInt32(JSONValue data) Returns newly created UInt32 object by converting referenced object to UInt32, anytime when doing typecast from JSONValue to UInt32. If JSONValue or it's referenced object is null a NullReferenceException will be thrown.
public static implicit operator Int64(JSONValue data) Returns newly created Int64 object by converting referenced object to Int64, anytime when doing typecast from JSONValue to Int64. If JSONValue or it's referenced object is null a NullReferenceException will be thrown.
public static implicit operator UInt64(JSONValue data) Returns newly created UInt64 object by converting referenced object to UInt64, anytime when doing typecast from JSONValue to UInt64. If JSONValue or it's referenced object is null a NullReferenceException will be thrown.
public static implicit operator Single(JSONValue data) Returns newly created Single object by converting referenced object to Single, anytime when doing typecast from JSONValue to Single. If JSONValue or it's referenced object is null a NullReferenceException will be thrown.
public static implicit operator Double(JSONValue data) Returns newly created Double object by converting referenced object to Double, anytime when doing typecast from JSONValue to Double. If JSONValue or it's referenced object is null a NullReferenceException will be thrown.
public static implicit operator Decimal(JSONValue data) Returns newly created Decimal object by converting referenced object to Decimal, anytime when doing typecast from JSONValue to Decimal. If JSONValue or it's referenced object is null a NullReferenceException will be thrown.
public static implicit operator JSONObject(JSONValue data) Returns JSONObject object by explicitly typecasting referenced object to JSONObject, or null if specified JSONValue or it's referenced object is null, anytime when doing typecast from JSONValue to JSONObject.
public static implicit operator JSONArray(JSONValue data) Returns JSONArray object by explicitly typecasting referenced object to JSONArray, or null if specified JSONValue or it's referenced object is null, anytime when doing typecast from JSONValue to JSONArray.
public static implicit operator JSONValue(String data) Returns newly created JSONValue from specified String anytime when doing typecast to JSONValue.
public static implicit operator JSONValue(Boolean data) Returns newly created JSONValue from specified Boolean anytime when doing typecast to JSONValue.
public static implicit operator JSONValue(Char data) Returns newly created JSONValue from specified Char anytime when doing typecast to JSONValue.
public static implicit operator JSONValue(Byte data) Returns newly created JSONValue from specified Byte anytime when doing typecast to JSONValue.
public static implicit operator JSONValue(Int16 data) Returns newly created JSONValue from specified Int16 anytime when doing typecast to JSONValue.
public static implicit operator JSONValue(UInt16 data) Returns newly created JSONValue from specified UInt16 anytime when doing typecast to JSONValue.
public static implicit operator JSONValue(Int32 data) Returns newly created JSONValue from specified Int32 anytime when doing typecast to JSONValue.
public static implicit operator JSONValue(UInt32 data) Returns newly created JSONValue from specified UInt32 anytime when doing typecast to JSONValue.
public static implicit operator JSONValue(Int64 data) Returns newly created JSONValue from specified Int64 anytime when doing typecast to JSONValue.
public static implicit operator JSONValue(UInt64 data) Returns newly created JSONValue from specified UInt64 anytime when doing typecast to JSONValue.
public static implicit operator JSONValue(Single data) Returns newly created JSONValue from specified Single anytime when doing typecast to JSONValue.
public static implicit operator JSONValue(Double data) Returns newly created JSONValue from specified Double anytime when doing typecast to JSONValue.
public static implicit operator JSONValue(JSONObject data) Returns newly created JSONValue from specified JSONObject anytime when doing typecast to JSONValue.
public static implicit operator JSONValue(JSONArray data) Returns newly created JSONValue from specified JSONArray anytime when doing typecast to JSONValue.

Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.