API Reference
Class
JsonObjectExtensions
Extension helpers for JsonObject.
Inheritance
- Object
- JsonObjectExtensions
Methods
public static JsonObject AddIfNotEmpty(JsonObject obj, String key, JsonArray value) #Returns:
JsonObjectAdds the array property only when the value is not null and contains at least one element.
Parameters
- obj IntelligenceX.Json.JsonObject
- Target JSON object.
- key System.String
- Property name.
- value IntelligenceX.Json.JsonArray
- Array to add when non-empty.
Returns
The same instance for fluent chaining.
public static JsonObject ExtractAdditional(JsonObject obj, params String[] knownKeys) #Returns:
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.
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object