PHPackages                             phpninjas/json - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. phpninjas/json

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

phpninjas/json
==============

v0.1.0(10y ago)019PHPPHP &gt;=5.4

Since Oct 15Pushed 10y ago1 watchersCompare

[ Source](https://github.com/phpninjas/JSON)[ Packagist](https://packagist.org/packages/phpninjas/json)[ Docs](https://github.com/phpninjas/JSON)[ RSS](/packages/phpninjas-json/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Installation
------------

[](#installation)

Get Composer

```
curl -sS https://getcomposer.org/installer | php
php composer.phar install
```

composer.json

```
{
  "require": {
    "phpninjas/json": "v0.1.0"
  }
}
```

JSON Library
------------

[](#json-library)

A simple wrapper around the json\_encode and json\_decode functions that handle errors with exceptions as opposed to using the built-in functions from PHP.

Encoding
--------

[](#encoding)

Turn a php variable into a json string (and throw an error during failure).

```
