JsonPath-PHP
JsonPath-PHP copied to clipboard
A JsonPath implementation in PHP
Hey @Galbar !'ve encountered an interesting issue here, we have the following example JSON: ``` {"box": {"length":[{"locale":null,"scope":null,"data":{"amount":"130.0000","unit":"CENTIMETER"}}] ``` We want to query with the following: `$.box.length.*.data.amount` But it looks like...
Allows to apply a regular expression on a key instead of value. So you can get _area_ only of the _room_ entries of the _house_: `$.house[?(/roo.*/)][area]` https://extendsclass.com/jsonpath-tester.html
Hi I'm just stumbled across a bug when using negative index, but the element with this index does not exist. The error can be triggered like this: ```php $object =...
suppose I have ``` { "a": { "v": "va" }, "b": { "v": "vb" } } ```` `$..[?(@.v=="va")]` returns ``` [ { "v":"va" } ] ``` how can I get...
The following queries provide results that do not match those of other implementations of JSONPath (compare https://cburgmer.github.io/json-path-comparison/): - [ ] `$.2` Input: ``` {"a": "first", "2": "second", "b": "third"} ```...
I did a bit of experimentation with a PR but wasn't quite able to get it to work, so I thought I'd take this to an issue to look for...
Hi, The `JsonObject` class turns empty objects into empty arrays and thus is unable to give back the original JSON representation. For example: ```json { "item1": {}, "item2": {} }...
`README.md` needs to be updated: - [ ] https://github.com/Galbar/JsonPath-PHP/issues/29#issuecomment-499373986 : missing examples of jsonpath - [x] #30 : change `getArray()` for `getValue()`
As mentioned in https://github.com/GetDKAN/RootedJsonData/issues/5#issuecomment-2047391509 the tests and the github actions pipeline should be updated to run in newer PHP versions.