PHPackages                             nokimaro/draperstudio-payload - 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. nokimaro/draperstudio-payload

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

nokimaro/draperstudio-payload
=============================

Serialisers/Deserialisers for several data-types

026PHP

Since Oct 18Pushed 9y ago1 watchersCompare

[ Source](https://github.com/nokimaro/draperstudio-payload)[ Packagist](https://packagist.org/packages/nokimaro/draperstudio-payload)[ RSS](/packages/nokimaro-draperstudio-payload/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Payload
=======

[](#payload)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b2de76947e1ed62dc04c3157ac4310c57b37380d885d71ea8c14d3376830b020/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f44726170657253747564696f2f7061796c6f61642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/DraperStudio/payload)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/a59875ece3d311466b423bba3da1b22a59119bfea55c5718a6655bd5b8efdacd/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f44726170657253747564696f2f5061796c6f61642f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/DraperStudio/Payload)[![Coverage Status](https://camo.githubusercontent.com/005694acc7b2987f0be6037589a9c1633eec8735fb6811370fc788d9c5a7c3e1/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f44726170657253747564696f2f7061796c6f61642e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/DraperStudio/payload/code-structure)[![Quality Score](https://camo.githubusercontent.com/400e8de30669b6b0b9cf7ad261891de0ad323e59c3359cc836bd3331218e93ae/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f44726170657253747564696f2f7061796c6f61642e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/DraperStudio/payload)[![Total Downloads](https://camo.githubusercontent.com/fc25b348b0ba9419f7e612feda3b8546c9e74e2003730815e5399ce7fbd9892a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f44726170657253747564696f2f7061796c6f61642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/DraperStudio/payload)

Install
-------

[](#install)

Via Composer

```
$ composer require draperstudio/payload
```

Usage
-----

[](#usage)

##### Serialise an input

[](#serialise-an-input)

```
(new Arr())->serialise($input);
(new Csv())->serialise($input);
(new Ini())->serialise($input);
(new Json())->serialise($input);
(new Value())->serialise($input);
(new Xml())->serialise($input);
(new Yaml())->serialise($input);
(new YamlInline())->serialise($input);
```

##### Unserialise an input

[](#unserialise-an-input)

```
(new Arr())->unserialise($contents, $class);
(new Csv())->unserialise($contents, $class);
(new Ini())->unserialise($contents, $class);
(new Json())->unserialise($contents, $class);
(new Value())->unserialise($contents, $class);
(new Xml())->unserialise($contents, $class);
(new Yaml())->unserialise($contents, $class);
```

##### Read a file and unserialise its contents

[](#read-a-file-and-unserialise-its-contents)

```
(new Arr())->read($path, $class);
(new Csv())->read($path, $class);
(new Ini())->read($path, $class);
(new Json())->read($path, $class);
(new Value())->read($path, $class);
(new Xml())->read($path, $class);
(new Yaml())->read($path, $class);
```

##### Serialise an input and write it into a file

[](#serialise-an-input-and-write-it-into-a-file)

```
(new Arr())->write($path, $input);
(new Csv())->write($path, $input);
(new Ini())->write($path, $input);
(new Json())->write($path, $input);
(new Value())->write($path, $input);
(new Xml())->write($path, $input);
(new Yaml())->write($path, $input);
(new YamlInline())->write($path, $input);
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [DraperStudio](https://github.com/DraperStudio)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b3ac1514c6252e185635a200beaa0cf049459e58240e705ef988fd967e857f47?d=identicon)[nokimaro](/maintainers/nokimaro)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/nokimaro-draperstudio-payload/health.svg)

```
[![Health](https://phpackages.com/badges/nokimaro-draperstudio-payload/health.svg)](https://phpackages.com/packages/nokimaro-draperstudio-payload)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M283](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M226](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M63](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M344](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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