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

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

guanguans/json-format
=====================

Format json string.

v1.1.2(5y ago)2951MITPHPPHP &gt;=5.4CI failing

Since Apr 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/guanguans/json-format)[ Packagist](https://packagist.org/packages/guanguans/json-format)[ Fund](https://www.guanguans.cn/images/wechat.jpeg)[ Patreon](https://www.patreon.com/guanguans)[ RSS](/packages/guanguans-json-format/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

json-format
===========

[](#json-format)

Format json string.

[![](./docs/usage.png)](./docs/usage.png)

[![Build Status](https://camo.githubusercontent.com/42fe63216fd4eb24a4b7f0eb29cb8b8d34532be02afd7a749ff2fb99f53f8844/68747470733a2f2f7472617669732d63692e6f72672f6775616e6775616e732f6a736f6e2d666f726d61742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/guanguans/json-format)[![Build Status](https://camo.githubusercontent.com/0184ce303fa71bf4fc8c02a19fec1012e623240027fa4e501c112d787f3521a9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6775616e6775616e732f6a736f6e2d666f726d61742f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/guanguans/json-format/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/09c681c6a962014c7a7475a97b58b252ddbc448c66f0140d2a6efc49bd85f79f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6775616e6775616e732f6a736f6e2d666f726d61742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/guanguans/json-format/?branch=master)[![codecov](https://camo.githubusercontent.com/dd8039781d4835a7e481bda3f5aa41002b16e61a251258a6d57cbca258a946c2/68747470733a2f2f636f6465636f762e696f2f67682f6775616e6775616e732f6a736f6e2d666f726d61742f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/guanguans/json-format)[![StyleCI](https://camo.githubusercontent.com/e4ff70edab46d111e38d96a8ca7c38e435fb9c3043107cfeb3f2b663475b0d1c/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3235353830383432362f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/255808426)[![Total Downloads](https://camo.githubusercontent.com/a9c20875b0f0a66620de8e980313f8a6fc395b74517bf8ae6916b6c8640877b6/68747470733a2f2f706f7365722e707567782e6f72672f6775616e6775616e732f6a736f6e2d666f726d61742f646f776e6c6f616473)](https://packagist.org/packages/guanguans/json-format)[![Latest Stable Version](https://camo.githubusercontent.com/f7cc09c1334beff4591100d97cec8475f78a8f80fe9fdbd4809cb669e07aad0d/68747470733a2f2f706f7365722e707567782e6f72672f6775616e6775616e732f6a736f6e2d666f726d61742f762f737461626c65)](https://packagist.org/packages/guanguans/json-format)[![License](https://camo.githubusercontent.com/cb7321d491f9676ffab04c68e0761c0f30aefb7169e5fb5cb00a44c75f7e547b/68747470733a2f2f706f7365722e707567782e6f72672f6775616e6775616e732f6a736f6e2d666f726d61742f6c6963656e7365)](https://packagist.org/packages/guanguans/json-format)

Requirements
------------

[](#requirements)

- PHP &gt; 5.4
- ext-json

Installing
----------

[](#installing)

```
$ composer require guanguans/json-format -v
```

Usage
-----

[](#usage)

### Code

[](#code)

```
