PHPackages                             ergebnis/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. ergebnis/json

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

ergebnis/json
=============

Provides a Json value object for representing a valid JSON string.

1.6.0(8mo ago)2521.7M—7.6%1[2 issues](https://github.com/ergebnis/json/issues)[4 PRs](https://github.com/ergebnis/json/pulls)7MITPHPPHP ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Dec 10Pushed 4w ago1 watchersCompare

[ Source](https://github.com/ergebnis/json)[ Packagist](https://packagist.org/packages/ergebnis/json)[ Docs](https://github.com/ergebnis/json)[ RSS](/packages/ergebnis-json/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (15)Versions (14)Used By (7)

json
====

[](#json)

[![Integrate](https://github.com/ergebnis/json/workflows/Integrate/badge.svg)](https://github.com/ergebnis/json/actions)[![Merge](https://github.com/ergebnis/json/workflows/Merge/badge.svg)](https://github.com/ergebnis/json/actions)[![Release](https://github.com/ergebnis/json/workflows/Release/badge.svg)](https://github.com/ergebnis/json/actions)[![Renew](https://github.com/ergebnis/json/workflows/Renew/badge.svg)](https://github.com/ergebnis/json/actions)

[![Code Coverage](https://camo.githubusercontent.com/783ad9ea0ad6d97cde74899b1c4ee74d203c8570914a032169389b22db5d8001/68747470733a2f2f636f6465636f762e696f2f67682f65726765626e69732f6a736f6e2f6272616e63682f6d61696e2f67726170682f62616467652e737667)](https://codecov.io/gh/ergebnis/json)

[![Latest Stable Version](https://camo.githubusercontent.com/d72f5818b130e7e862511f3964e01c38a6a8978ea60626b5b31c9f69d5b93814/68747470733a2f2f706f7365722e707567782e6f72672f65726765626e69732f6a736f6e2f762f737461626c65)](https://packagist.org/packages/ergebnis/json)[![Total Downloads](https://camo.githubusercontent.com/31144ccd0a94afd8426e2b003a8d90041eeab4334f49156502923420df8d7fd0/68747470733a2f2f706f7365722e707567782e6f72672f65726765626e69732f6a736f6e2f646f776e6c6f616473)](https://packagist.org/packages/ergebnis/json)[![Monthly Downloads](https://camo.githubusercontent.com/8498488e1e3d17725758a2cf7b4d59fa40fbced2691218de00642c61ebdc5915/687474703a2f2f706f7365722e707567782e6f72672f65726765626e69732f6a736f6e2f642f6d6f6e74686c79)](https://packagist.org/packages/ergebnis/json)

This project provides a [`composer`](https://getcomposer.org) package with a `Json` value object for representing a valid JSON `string`.

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

[](#installation)

Run

```
composer require ergebnis/json
```

Usage
-----

[](#usage)

### Create a `Json` object from `string`

[](#create-a-json-object-from-string)

Create a `Json` object from a `string`:

```
