Skip to content

fefas/jsoncoder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Build Status

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock

Jsoncoder

Jsoncode is the result of I claiming by a way to encode, decode and whatever JSON using classes with error handling intead of awful functions.

Installation

Install it using Composer:

$ composer require fefas/jsoncoder

Usage

<?php

use Fefas\Jsoncoder\Json;

$json1 = Json::createFromString('{"field":"value"}'); // from a json string
$json2 = Json::create(['field' => 'anotherValue']); // from PHP values

echo $json1; // {"field":"value"}
echo $json2; // {"field":"anotherValue"}

$json1->decode(); // ['field' => 'value']
$json2->decode(); // ['field' => 'anotherValue']

$json1->isEqualTo($json2); // false

About

Json as a class

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages