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

AbandonedTypo3-flow-package[Parsing &amp; Serialization](/categories/parsing)

ttree/serializer
================

Package for TYPO3 Flow to convert PHP object to and from JSON

1.0.1(11y ago)0142LGPL-3.0+PHP

Since Nov 7Pushed 10y ago2 watchersCompare

[ Source](https://github.com/ttreeagency/Serializer)[ Packagist](https://packagist.org/packages/ttree/serializer)[ RSS](/packages/ttree-serializer/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

Ttree.Serializer - Package for TYPO3 Flow to convert PHP object to and from JSON
================================================================================

[](#ttreeserializer---package-for-typo3-flow-to-convert-php-object-to-and-from-json)

[![Build Status](https://camo.githubusercontent.com/8f529ad8e04d8c6e2470c005a46104b6469dcb16ab330ab3601da89c474a3e67/68747470733a2f2f7472617669732d63692e6f72672f74747265656167656e63792f54747265652e53657269616c697a65722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/ttreeagency/Ttree.Serializer) [![Total Downloads](https://camo.githubusercontent.com/5cbb29c405416a06d400f36acb3be40d590997b641f9e7d3e66cc391fdbd0703/68747470733a2f2f706f7365722e707567782e6f72672f74747265652f73657269616c697a65722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/ttree/serializer)

This package can be used to convert PHP object to and from JSON. The current version support object tree, but no circular references, as there is no way to represent this kind of reference in a JSON file.

Usage
-----

[](#usage)

Use DI to inject the `Ttree\Serializer\SerializerInterface` where you need it:

```
class ObjectUtility {

	/**
	 * @Flow\Inject
	 * @var \Ttree\Serializer\SerializerInterface
	 */
	protected $serializer;

	/**
	 * @param object $object
	 * @return string
	 */
	public function save($object) {
		$json = $this->serializer->serialize($object);
	}

	/**
	 * @param string $string
	 * @return object
	 */
	public function load($string) {
		$json = $this->serializer->unserialize($string);
	}

}
```

### Skip property

[](#skip-property)

The serializer will only include gettable properties. Transient property in a Doctrine entity are skipped automaticaly.

You can skip any property by using the `Ttree\Serializer\Annotations\Skip`.

Functional Programming
----------------------

[](#functional-programming)

You can also use directly the objects `Ttree\Serializer\Json\Serialize` and `Ttree\Serializer\Json\Serialize` in a functionnal style programming:

```
$serialize = new Serialize();
$json = $serialize(array('Hello', 'World'));
$unserialize = new Unserialize();
$array = $unserialize('["Hello","World"]')
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

4255d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/145363?v=4)[ttree](/maintainers/ttree)[@ttree](https://github.com/ttree)

---

Top Contributors

[![dfeyer](https://avatars.githubusercontent.com/u/221173?v=4)](https://github.com/dfeyer "dfeyer (17 commits)")

### Embed Badge

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

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

###  Alternatives

[mck89/peast

Peast is PHP library that generates AST for JavaScript code

19139.2M47](/packages/mck89-peast)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9843.5k](/packages/sauladam-shipment-tracker)[jstewmc/rtf

Read and write Rich Text Format (RTF) documents with PHP

45153.1k6](/packages/jstewmc-rtf)[tcds-io/php-jackson

A lightweight, flexible object serializer for PHP, inspired by FasterXML/jackson

113.2k10](/packages/tcds-io-php-jackson)

PHPackages © 2026

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