PHPackages                             thiagocordeiro/serializer - 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. thiagocordeiro/serializer

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

thiagocordeiro/serializer
=========================

3.3.7(6mo ago)08.3k↓26.7%12MITPHPPHP &gt;=8.2CI passing

Since Apr 21Pushed 6mo agoCompare

[ Source](https://github.com/thiagocordeiro/serializer)[ Packagist](https://packagist.org/packages/thiagocordeiro/serializer)[ RSS](/packages/thiagocordeiro-serializer/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (4)Versions (37)Used By (2)

PHP Serializer
==============

[](#php-serializer)

This package allows you to parse json objects into php classes without the overhead of annotations, it checks for php object constructor and creates cache classes to convert json into a given class.

How to use
----------

[](#how-to-use)

For Symfony projects a bundle is available at [`serializer-bundle`](https://github.com/thiagocordeiro/serializer-bundle)

For Laravel projects a package is available at [`laravel-serializer`](https://github.com/thiagocordeiro/laravel-serializer)

otherwise the package is available on composer:

```
composer require thiagocordeiro/serializer

```

PHP Serializer does not use setters, so your class must have a constructor with all properties coming from the json.

#### Basic example (Using getters)

[](#basic-example-using-getters)

```
