PHPackages                             klebk/json-to-popo - 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. [API Development](/categories/api)
4. /
5. klebk/json-to-popo

ActiveLibrary[API Development](/categories/api)

klebk/json-to-popo
==================

Fill Plain Old PHP Object with JSON content. Fork of abgeo/json-to-popo.

v1.0.1(3y ago)1961MITPHPPHP ^7.2|^8.0

Since Sep 30Pushed 3y agoCompare

[ Source](https://github.com/klebk/json-to-popo)[ Packagist](https://packagist.org/packages/klebk/json-to-popo)[ Docs](https://github.com/ABGEO07/json-to-popo)[ Fund](https://www.paypal.me/ABGEO)[ Fund](https://opencollective.com/ABGEO)[ RSS](/packages/klebk-json-to-popo/feed)WikiDiscussions 1.x Synced 1mo ago

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

json-to-popo
============

[](#json-to-popo)

Fill Plain Old PHP Object with JSON content.

[![Build Status](https://camo.githubusercontent.com/3ff0e600fd5ef68255179633ecba81bfa2cdb00266dbbc19750e6807e81dbd11/68747470733a2f2f7472617669732d63692e636f6d2f414247454f2f6a736f6e2d746f2d706f706f2e7376673f6272616e63683d312e78)](https://travis-ci.com/ABGEO/json-to-popo?branch=1.x)[![Coverage Status](https://camo.githubusercontent.com/0a6b67e19b222b42cfca439259550e13a3adbdff84638060ad0e7ab604b2972c/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f414247454f2f6a736f6e2d746f2d706f706f2f62616467652e7376673f6272616e63683d312e78)](https://coveralls.io/github/ABGEO/json-to-popo?branch=1.x)[![GitHub release](https://camo.githubusercontent.com/6c57b4884f4f272e1166e7304dc0f50ad5b491110762f85f82a65f148c52abc1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f414247454f2f6a736f6e2d746f2d706f706f2e737667)](https://github.com/ABGEO/json-to-popo/releases)[![Packagist Version](https://camo.githubusercontent.com/ff933a29c3b0107c55ab33e7b466a3ce9468216be372ef158e9fb0a1e12f3cf3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616267656f2f6a736f6e2d746f2d706f706f2e737667)](https://packagist.org/packages/abgeo/json-to-popo)[![GitHub license](https://camo.githubusercontent.com/f518274fedbefcbba611df5a3ca0485f4c5dda8bbc30f0c825a2a8f913cf4be9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f414247454f2f6a736f6e2d746f2d706f706f2e737667)](https://github.com/ABGEO/json-to-popo/blob/master/LICENSE)

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

[](#installation)

You can install this library with [Composer](https://getcomposer.org/):

- `composer require abgeo/json-to-popo`

Usage
-----

[](#usage)

Include composer autoloader in your main file (Ex.: index.php)

- `require __DIR__.'/../vendor/autoload.php';`

Consider that you have `example.json` with the following content:

```
{
  "firstName": "Temuri",
  "lastName": "Takalandze",
  "active": true,
  "position": {
    "title": "Developer",
    "department": {
      "title": "IT"
    }
  }
}
```

and several POPO classes to represent this JSON data:

`Department.php`

```
