Wraps a JSON data structure in a Map
-like interface,
with additional utilities for retrieving data from nested paths
and for handling array data.
Static methods
staticexistsByPath(this:Dynamic, path:String):Dynamic
Query existance of an element of the JSON data by a normalized JSONPath.
staticinlineget(this:Dynamic, key:String, ?defaultValue:Dynamic):Null<Dynamic>
Returns a value by specified key
.
Can be used like jsonData["key"]
Returns:
The value, or the defualt if the key is not present.
Can return null
if the value was present but null.
staticgetByPath(this:Dynamic, path:String):Null<Dynamic>
Get an element of the JSON data by a normalized JSONPath.
If you want to perform a query using an actual JSONPath, use JSONPath.query()
instead.
staticinlineinsertByPath(this:Dynamic, path:String, value:Dynamic, strict:Bool = false):Dynamic
Insert an element into the JSON object/array by a normalized JSONPath.
staticremoveByPath(this:Dynamic, path:String):Dynamic
Remove an element of the JSON data by a normalized JSONPath.