JsonObject
Represents a mutable JSON object.
Inheritance
- Object
- JsonObject
Constructors
Methods
public JsonObject Add(String key, JsonArray value) #JsonObjectAdds or replaces a JSON value for the specified key.
Parameters
- key System.String
- value IntelligenceX.Json.JsonValue
public JsonObject Add(String key, String value) #JsonObjectAdds or replaces a string value for the specified key.
Parameters
- key System.String
- value System.String
public JsonObject Add(String key, Boolean value) #JsonObjectAdds or replaces a boolean value for the specified key.
Parameters
- key System.String
- value System.Boolean
public JsonObject Add(String key, Int64 value) #JsonObjectAdds or replaces an integer value for the specified key.
Parameters
- key System.String
- value System.Int64
public JsonObject Add(String key, Double value) #JsonObjectAdds or replaces a double value for the specified key.
Parameters
- key System.String
- value System.Double
Add(System.String key, IntelligenceX.Json.JsonObject value) #Adds or replaces a JSON object value for the specified key.
Parameters
- key System.String
- value IntelligenceX.Json.JsonObject
Add(System.String key, IntelligenceX.Json.JsonArray value) #Adds or replaces a JSON array value for the specified key.
Parameters
- key System.String
- value IntelligenceX.Json.JsonArray
public JsonArray GetArray(String key) #JsonArrayReturns a JSON array value for the specified key.
Parameters
- key System.String
public Boolean GetBoolean(String key, Boolean defaultValue = false) #BooleanReturns a boolean value for the specified key or a default when missing.
Parameters
- key System.String
- defaultValue System.Boolean = false
public Nullable<Double> GetDouble(String key) #Nullable<Double>Returns a double value for the specified key.
Parameters
- key System.String
public virtual IEnumerator<KeyValuePair<String, JsonValue>> GetEnumerator() #IEnumerator<KeyValuePair<String, JsonValue>>Returns a typed enumerator over the object's properties.
public Nullable<Int64> GetInt64(String key) #Nullable<Int64>Returns an integer value for the specified key.
Parameters
- key System.String
public JsonObject GetObject(String key) #JsonObjectReturns a JSON object value for the specified key.
Parameters
- key System.String
public String GetString(String key) #StringReturns a string value for the specified key.
Parameters
- key System.String
System#Collections#IEnumerable#GetEnumerator() #Returns a non-generic enumerator over the object's properties.
public Boolean TryGetValue(String key, out JsonValue value) #BooleanAttempts to retrieve a JSON value by key.
Parameters
- key System.String
- value IntelligenceX.Json.JsonValue@
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
Extension Methods
public static JsonObject ExtractAdditional(JsonObject obj, params String[] knownKeys) #JsonObjectReturns a new object containing properties that are not in knownKeys.
Parameters
- obj IntelligenceX.Json.JsonObject
- Source JSON object.
- knownKeys System.String[]
- Keys to exclude from the result.
Returns
A new object containing unknown keys, or null when none exist.