2017 © Pedro Peláez
 

library php-json-handler

Class for opening and writing to json files easily

image

dayjo/php-json-handler

Class for opening and writing to json files easily

  • Wednesday, February 28, 2018
  • by Dayjo
  • Repository
  • 0 Watchers
  • 0 Stars
  • 46 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 12 Versions
  • 0 % Grown

The README.md

PHP JSON Handler

Class to open, modify and write json objects in files., (*1)

Installation (without composer)

Just include the json.php file., (*2)

require 'src/json.php';

Alternatively, namespace and autoload it., (*3)

Installation (with composer)

composer require dayjo/php-json-handler

Then use;, (*4)

use Dayjo\JSON;

Usage

Basic usage includes auto saving, so you just modify the data and it saves!, (*5)

<?php
$JSON = new JSON('config.json');
$config =& $JSON->data; // You could just do $config->data->name = ...

$config->name = 'dayjo';
$config->last_edited = time();

Options

Auto Save

The optional second parameter to the JSON class allows you to turn off auto save, and make it so you have to run the save function manually for instance;, (*6)

<?php
$JSON = new JSON('config.json', false);
$config =& $JSON->data;

$config->name = 'dayjo';

$JSON->save();

The Versions

28/02 2018

dev-development

dev-development

Class for opening and writing to json files easily

  Sources   Download

MIT

by Joel Day

28/02 2018

dev-master

9999999-dev

Class for opening and writing to json files easily

  Sources   Download

MIT

by Joel Day

28/02 2018

v1.0.16

1.0.16.0

Class for opening and writing to json files easily

  Sources   Download

MIT

by Joel Day

12/01 2018

v1.0.14

1.0.14.0

Class for opening and writing to json files easily

  Sources   Download

MIT

by Joel Day

12/01 2018

v1.0.15

1.0.15.0

Class for opening and writing to json files easily

  Sources   Download

MIT

by Joel Day

05/01 2018

v1.0.13

1.0.13.0

Class for opening and writing to json files easily

  Sources   Download

MIT

by Joel Day

05/01 2018

v1.0.12

1.0.12.0

Class for opening and writing to json files easily

  Sources   Download

MIT

by Joel Day

03/10 2017

v1.0.10

1.0.10.0

Class for opening and writing to json files easily

  Sources   Download

MIT

by Joel Day

02/10 2017

v1.0.7

1.0.7.0

Class for opening and writing to json files easily

  Sources   Download

MIT

by Joel Day

02/10 2017

v1.0.5

1.0.5.0

Class for opening and writing to json files easily

  Sources   Download

MIT

by Joel Day

02/10 2017

v1.0.2

1.0.2.0

Class for opening and writing to json files easily

  Sources   Download

MIT

by Joel Day

02/10 2017

v1.0.1

1.0.1.0

Class for opening and writing to json files easily

  Sources   Download

MIT

by Joel Day