Class JsonPath
java.lang.Object
dev.blaauwendraad.masker.json.path.JsonPath
A
JsonPath expression is used to traverse, select and extract fields and values from a JSON document.
Example JSON and corresponding paths:
{
"a": "1",
"b": {
"c": "2"
},
"d": [
{
"e": "3",
"f": "4"
},
{
"g": "5"
}
]
}
In the context of this library, any JsonPath starts with a '$' symbol, which denotes the root node.
Then, access to nested JSON objects is denoted by a dot ('.') followed by a String name
selector which denotes the key of the nested object.
Furthermore, a numeric index selector (e.g. 3) selects an indexed child of an array.
So, considering the example JSON above:
- $.a = "1"
- $.b.c = "2"
- $.d[0].e = "3"
- $.d[0].f = "4"
- $.d[1].g = "5"
-
Method Summary