2017 © Pedro Peláez
 

library json_data

This library is an object-oriented interface that works with data in JSON format

image

steein/json_data

This library is an object-oriented interface that works with data in JSON format

  • Sunday, January 22, 2017
  • by Steein
  • Repository
  • 0 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

SteeinJSON Data

This library is an object-oriented interface that works with data in JSON format, (*1)

Usage

Example 1


use SteeinJSON\JSON; $myJson = " { "steein": { "item":"value" } } "; $object = new JSON($myJson);

Example 2


use SteeinJSON\JSON; $object = new JSON(); $object->text->item = 'value'; $object->text->item->one = 'value2'; //By default, simply output through "echo" echo $object; //At the request is allowed to maintain in a JSON file $file = __DIR__.'/json/item.json'; $object->save($file);

Working with existing objects

If you would like to work with an existing object, rather than parsing a string, pass this object as the third constructor argument:, (*2)

use SteeinJSON\JSON;

$object = new JSON(null, null, $customJSON);



///Validating Against a Schema
$object->check($customSchema, [$extraSchemaURI => $extraSchemaData]);

Author: Shamsudin Serderov

The Versions

22/01 2017

dev-master

9999999-dev http://sourcecode.steein.ru

This library is an object-oriented interface that works with data in JSON format

  Sources   Download

MIT

The Requires