PHPackages                             mikangali/pson - 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. mikangali/pson

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

mikangali/pson
==============

Convert an Object into its JSON representation and vice versa

47PHP

Since Nov 15Pushed 12y ago2 watchersCompare

[ Source](https://github.com/mikangali-labs/Pson)[ Packagist](https://packagist.org/packages/mikangali/pson)[ RSS](/packages/mikangali-pson/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Pson
====

[](#pson)

A PHP library to convert an Object into its JSON representation and vice versa. Use Addendum PHP Lib. The librairy try to do the same job that Java Gson Library.

Version : 1.0 Require : PHP 5.4 +

---

### Features

[](#features)

- Convert object to json and Json to object
- Convert PHP object containning private fiels
- Use annotation to serialize/deserialize complex fileds
- PsonBuilder class to set Pson options (serializeNulls, excludeModifiers ...)
- @Expose annotation for managing fields exclusion

---

### Package content

[](#package-content)

- ./Pson.class.php : Pson lib class
- ./addendum/ : Addendum lib used by Pson
- ./index.php : Pson usage sample

---

### Usage

[](#usage)

```
