2017 © Pedro Peláez
 

library php-jsonpath

JSONPath Library and Helper

image

brainplusplus/php-jsonpath

JSONPath Library and Helper

  • Saturday, October 28, 2017
  • by brainplusplus
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

php-jsonpath

fork from https://code.google.com/archive/p/jsonpath, (*1)

and add JsonPathHelper class, (*2)

how to use :, (*3)

$url = "https://api-ssl.bitly.com/v3/link/referrers?access_token=xxxxx&link=http://bit.ly/xxxxx";, (*4)

for example json in that url is :, (*5)

{"status_code": 200, "data": {"units": -1, "unit_reference_ts": null, "tz_offset": -4, "unit": "day", "referrers": [{"referrer": "https://t.co/", "clicks": 111}, {"referrer": "direct", "clicks": 99}, {"referrer": "android-app://com.twitter.android", "clicks": 81}, {"referrer": "/android-app://com.twitter.android", "clicks": 2}]}, "status_txt": "OK"}, (*6)

$expr = "$..referrers.*";, (*7)

echo ", (*8)

Contoh ambil json string value

"; $result = JsonPathHelper::getJsonStringValueByUrl($url,$expr); echo $result;, (*9)

echo ", (*10)

Contoh ambil json string path

"; $result = JsonPathHelper::getJsonStringPathByUrl($url,$expr); echo $result;, (*11)

echo ", (*12)

Contoh ambil json object

"; $result = JsonPathHelper::getJsonValueByUrl($url,$expr); var_dump($result);, (*13)

The Versions

28/10 2017

dev-master

9999999-dev

JSONPath Library and Helper

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Muhammad Tri Wibowo

28/10 2017

1.0.0

1.0.0.0

JSONPath Library and Helper

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Muhammad Tri Wibowo