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

Abandoned → [symfony/serializer](/?search=symfony%2Fserializer)ArchivedLibrary[Parsing &amp; Serialization](/categories/parsing)

ivory/serializer
================

Serializer for PHP 7.0+ supporting JSON, XML, YAML &amp; CSV

1.0.4(5y ago)3217.5k↓59.3%3[1 issues](https://github.com/bresam/ivory-serializer/issues)2MITPHPPHP &gt;=7.0

Since Feb 27Pushed 3y agoCompare

[ Source](https://github.com/bresam/ivory-serializer)[ Packagist](https://packagist.org/packages/ivory/serializer)[ RSS](/packages/ivory-serializer/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (14)Versions (7)Used By (2)

README
======

[](#readme)

[![Travis Build Status](https://camo.githubusercontent.com/ce83c269147b696f20f5958e2d36aed4b260503a58acee610190e4be5a2567bb/68747470733a2f2f6170692e7472617669732d63692e636f6d2f62726573616d2f69766f72792d73657269616c697a65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/github/bresam/ivory-serializer)[![Code Coverage](https://camo.githubusercontent.com/b2bab4599479734239bcabe1b4c3dc9f5bd50ef2975c6cda4c855fafb62868e9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62726573616d2f69766f72792d73657269616c697a65722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bresam/ivory-serializer/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/3eb0c7d0fc8129a9bd9c6b80d4e3adc980d8aa8e7d00ee3fc262d01e6f1de44e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f62726573616d2f69766f72792d73657269616c697a65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bresam/ivory-serializer/?branch=master)

Overview
--------

[](#overview)

The Ivory Serializer is a PHP ^7.0 library allowing you to (de)-serialize complex data using the visitor pattern recursively on each node of the graph. It supports the CSV, JSON, XML and YAML formats. It also supports features such as exclusion strategies (groups, max depth, circular reference, version, ...), naming strategies (camel case, snake case, studly caps), automatic/explicit mapping (reflection, annotation, XML, YAML, JSON) and many others...

```
use Ivory\Serializer\Format;
use Ivory\Serializer\Serializer;

$stdClass = new \stdClass();
$stdClass->foo = true;
$stdClass->bar = ['foo', [123, 432.1]];

$serializer = new Serializer();

echo $serializer->serialize($stdClass, Format::JSON);
// {"foo": true,"bar": ["foo", [123, 432.1]]}

$deserialize = $serializer->deserialize($json, \stdClass::class, Format::JSON);
// $deserialize == $stdClass
```

Documentation
-------------

[](#documentation)

- [Installation](/doc/installation.md)
- [Usage](/doc/usage.md)
- [Mapping](/doc/mapping.md)
- [Type](/doc/type.md)
- [Event](/doc/event.md)
- [Visitor](/doc/visitor.md)
- [Context](/doc/context.md)
    - [Exclusion strategies](/doc/context.md#exclusion-strategies)
    - [Naming strategies](/doc/context.md#naming-strategies)
- [Development Environment](/doc/development_environment.md)

Testing
-------

[](#testing)

The library is fully unit tested by [PHPUnit](http://www.phpunit.de/) with a code coverage close to **100%**. To execute the test suite, check the travis [configuration](/.travis.yml).

Contribute
----------

[](#contribute)

We love contributors! Ivory is an open source project. If you'd like to contribute, feel free to propose a PR! You can follow the [CONTRIBUTING](/CONTRIBUTING.md) file which will explain you how to set up the project.

License
-------

[](#license)

The Ivory Serializer is under the MIT license. For the full copyright and license information, please read the [LICENSE](/LICENSE) file that was distributed with this source code.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 93.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~352 days

Total

5

Last Release

2004d ago

PHP version history (3 changes)1.0.0PHP ^5.6|^7.0

1.0.1PHP ^7.0

1.0.4PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/20f86580574d84af96c7fa8cb679dccb4610564b4019d7a2904b28640656da7a?d=identicon)[bresam](/maintainers/bresam)

---

Top Contributors

[![GeLoLabs](https://avatars.githubusercontent.com/u/149005863?v=4)](https://github.com/GeLoLabs "GeLoLabs (101 commits)")[![bresam](https://avatars.githubusercontent.com/u/52054015?v=4)](https://github.com/bresam "bresam (6 commits)")[![AlexandrePavy](https://avatars.githubusercontent.com/u/6603411?v=4)](https://github.com/AlexandrePavy "AlexandrePavy (1 commits)")

---

Tags

serializer

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/ivory-serializer/health.svg)

```
[![Health](https://phpackages.com/badges/ivory-serializer/health.svg)](https://phpackages.com/packages/ivory-serializer)
```

###  Alternatives

[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[doctrine/orm

Object-Relational-Mapper for PHP

10.2k300.5M7.5k](/packages/doctrine-orm)[jms/serializer

Library for (de-)serializing data of any complexity; supports XML, and JSON.

2.3k141.9M929](/packages/jms-serializer)[masterminds/html5

An HTML5 parser and serializer.

1.8k269.7M322](/packages/masterminds-html5)[symfony/rate-limiter

Provides a Token Bucket implementation to rate limit input and output in your application

27054.3M290](/packages/symfony-rate-limiter)[typo3/cms-core

TYPO3 CMS Core

3713.2M5.1k](/packages/typo3-cms-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
