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)3211.7k↓15%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 1mo 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

36

—

LowBetter than 82% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity38

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

1958d 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

[jms/serializer

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

2.3k135.8M851](/packages/jms-serializer)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[egeloen/serializer

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

28574.6k3](/packages/egeloen-serializer)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[goetas-webservices/xsd2php

Convert XSD (XML Schema) definitions into PHP classes and JMS metadata

2411.6M37](/packages/goetas-webservices-xsd2php)[goetas-webservices/xsd2php-runtime

Convert XSD (XML Schema) definitions into PHP classes

4910.9M36](/packages/goetas-webservices-xsd2php-runtime)

PHPackages © 2026

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