PHP code example of remorhaz / php-json-data
1. Go to this page and download the library: Download remorhaz/php-json-data library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
remorhaz / php-json-data example snippets
use Remorhaz\JSON\Data\Value\DecodedJson;
use Remorhaz\JSON\Data\Value\EncodedJson;
// Both values represent same JSON document:
$value1 = EncodedJson\NodeValueFactory::create()->createValue('{"a":"b"}');
$value2 = DecodedJson\NodeValueFactory::create()->createValue((object) ['a' => 'b']);