Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 744 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 744 Bytes

Json

Build Status codecov Type Coverage

Type safe json encode/decoder, the goal is to not leave errors unchecked.

Installation

composer require innmind/json

Usage

use Innmind\Json\Json;

Json::encode(['foo' => 'bar']); // {"foo":"bar"}
Json::decode('{"foo":"bar"}'); // ['foo' => 'bar']
Json::decode('{]'); // will throw an exception (instead of returning false)