PHPackages                             uni-method/json-to-php-class - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. uni-method/json-to-php-class

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

uni-method/json-to-php-class
============================

0.5.0(2y ago)31.0k↓77.8%PHP

Since Jun 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/uni-method/json-to-php-class)[ Packagist](https://packagist.org/packages/uni-method/json-to-php-class)[ RSS](/packages/uni-method-json-to-php-class/feed)WikiDiscussions master Synced 5d ago

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

Json to PHP classes
===================

[](#json-to-php-classes)

Easy converts json to php classes, parse json array to array of classes. Good tool to create bridge with excited API based on json format.

### Go to section

[](#go-to-section)

- [Camel case vs snake case](#camel-case-vs-snake-case)
- [Script to generate php classes from json](#how-to-use)

Install via composer
--------------------

[](#install-via-composer)

```
composer require --dev uni-method/json-to-php-class
```

### For example

[](#for-example)

Current json

```
{
  "count": 150,
  "same": [
    {
      "length": 22.34,
      "tag": {
        "name": "zip"
      }
    },
    {
      "length": 160.84
    }
  ]
}
```

will be converted into three php files

```
