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

AbandonedTypo3-flow-package

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 1mo ago

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 54% 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

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

[mrimann/xlifftranslator

Little helper that allows the developer to locally translate the Xliff files of his package(s).

101.7k](/packages/mrimann-xlifftranslator)[ag/event

A package that strives to best possible support the TYPO3 Flow PHP Framework with Domain Events as described in »Implementing Domain-Driven Design« by Vaughn Vernon.

111.1k](/packages/ag-event)

PHPackages © 2026

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