PHPackages                             dimitrilahaye/dodo-entity-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. dimitrilahaye/dodo-entity-serializer

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

dimitrilahaye/dodo-entity-serializer
====================================

Dodo is back and he's very angry (and hungry.. huh)! With him, you can now convert some entity-like objects into json and some json into entity-like object! And he automatically manages objects array and array-like json. So cute :)

0.1.1-alpha(10y ago)06proprietaryPHP &gt;=5.4

Since May 24Compare

[ Source](https://github.com/dimitrilahaye/Dodo-Entity-Serializer)[ Packagist](https://packagist.org/packages/dimitrilahaye/dodo-entity-serializer)[ Docs](https://github.com/dimitrilahaye/Dodo-Entity-Serializer)[ RSS](/packages/dimitrilahaye-dodo-entity-serializer/feed)WikiDiscussions Synced 2w ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

\#[![ ](https://camo.githubusercontent.com/d4fd315b5846dcb0c9ebb4b0c2582108bfb8c7d6a44b157e7294c4e405338412/687474703a2f2f6f72696730332e64657669616e746172742e6e65742f643030622f662f323031312f3034312f312f312f646f646f6f5f616e696d617465645f7370726974655f62795f706f6b656b6f6b732d643339376d76742e676966)](https://camo.githubusercontent.com/d4fd315b5846dcb0c9ebb4b0c2582108bfb8c7d6a44b157e7294c4e405338412/687474703a2f2f6f72696730332e64657669616e746172742e6e65742f643030622f662f323031312f3034312f312f312f646f646f6f5f616e696d617465645f7370726974655f62795f706f6b656b6f6b732d643339376d76742e676966) Dodo Entity Serializer Library

Dodo is back and he's very angry (and hungry.. huh)! With him, you can now convert some entity-like objects into json and some json into entity-like object! And he automatically manages objects array and array-like json. So cute :)

---

Table of Contents
-----------------

[](#table-of-contents)

- [EntitySerializer](#entityserializer)
    - [getInstance](#getinstance)
    - [jsonToObject](#jsontoobject)
    - [objectToJson](#objecttojson)
- [Coming Soon](#coming-soon)

EntitySerializer
----------------

[](#entityserializer)

General class for DodoEntitySerializer. Provides all the methods to :

- Convert Entity Object or Array of Entities Objects to JSON
- Convert JSON to Entity Object or array of Entities Objects JSON

- Full name: \\DodoPhpLab\\DodoEntitySerializer\\Classes\\EntitySerializer

### getInstance

[](#getinstance)

```
EntitySerializer::getInstance(  )
```

- This method is **static**.

---

### jsonToObject

[](#jsontoobject)

Returns an object from a json and the class's namespace of the object we want to return.

```
EntitySerializer::jsonToObject( string $classNamespace, string $json ): mixed[]
```

**Parameters:**

ParameterTypeDescription`$classNamespace`**string**the class name with namespace.`$json`**string**the json to transform in object.**Return Value:**

array of Entity-type objects or one Entity-type object.

---

### objectToJson

[](#objecttojson)

Returns a string formatted json from an object and his class's namespace.

```
EntitySerializer::objectToJson( string $classNamespace, mixed[] $object ): string
```

**Parameters:**

ParameterTypeDescription`$classNamespace`**string**the class name with namespace.`$object`**mixed\[\]**the object to transform into json.**Return Value:**

the string formatted json representation of the $object passed in argument.

---

[![ ](https://camo.githubusercontent.com/d4fd315b5846dcb0c9ebb4b0c2582108bfb8c7d6a44b157e7294c4e405338412/687474703a2f2f6f72696730332e64657669616e746172742e6e65742f643030622f662f323031312f3034312f312f312f646f646f6f5f616e696d617465645f7370726974655f62795f706f6b656b6f6b732d643339376d76742e676966)](https://camo.githubusercontent.com/d4fd315b5846dcb0c9ebb4b0c2582108bfb8c7d6a44b157e7294c4e405338412/687474703a2f2f6f72696730332e64657669616e746172742e6e65742f643030622f662f323031312f3034312f312f312f646f646f6f5f616e696d617465645f7370726974655f62795f706f6b656b6f6b732d643339376d76742e676966) Coming Soon
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#-coming-soon)

> - Handle add... methods (there : addSubscriber with User object in argument)
> - See how to manage null values
> - Manage exceptions
> - Write some things into README

---

> This document was automatically generated from source code comments on 2016-05-25 using [phpDocumentor](http://www.phpdoc.org/) and [cvuorinen/phpdoc-markdown-public](https://github.com/cvuorinen/phpdoc-markdown-public)

###  Health Score

21

—

LowBetter than 17% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 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

3733d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7722597?v=4)[Dimitri Lahaye](/maintainers/dimitrilahaye)[@dimitrilahaye](https://github.com/dimitrilahaye)

---

Top Contributors

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

---

Tags

jsonserializerentitydodo

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dimitrilahaye-dodo-entity-serializer/health.svg)

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

###  Alternatives

[zumba/json-serializer

Serialize PHP variables, including objects, in JSON format. Support to unserialize it too.

124797.0k16](/packages/zumba-json-serializer)[laktak/hjson

JSON for Humans. A configuration file format with relaxed syntax, fewer mistakes and more comments.

86249.0k14](/packages/laktak-hjson)[thunderer/serializard

Flexible serializer

2668.0k1](/packages/thunderer-serializard)[opensoft/simple-serializer

Simple Serializer

1914.2k1](/packages/opensoft-simple-serializer)

PHPackages © 2026

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