PHPackages                             aklump/collection\_json - 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. aklump/collection\_json

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

aklump/collection\_json
=======================

Php objects for working with hypermedia Collection+JSON (http://amundsen.com/media-types/)

0.9.1(3y ago)386BSD-3-ClausePHPPHP &gt;=7.3

Since May 8Pushed 3y ago3 watchersCompare

[ Source](https://github.com/aklump/collection_json)[ Packagist](https://packagist.org/packages/aklump/collection_json)[ Docs](http://www.intheloftstudios.com/packages/php/collection_json)[ RSS](/packages/aklump-collection-json/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (19)Used By (0)

How to create a collection object programatically
-------------------------------------------------

[](#how-to-create-a-collection-object-programatically)

Creating objects from JSON strings
----------------------------------

[](#creating-objects-from-json-strings)

The key method will be `\AKlump\Http\CollectionJson\CollectionBase::import`, which converts JSON strings into the appropriate object based on it's format.

You can also create a Collection object from json using Collection-&gt;setContent().

Converting objects to JSON
--------------------------

[](#converting-objects-to-json)

Cast any object to string to get it's JSON equivalent.

Converting from Collection+JSON to JSON
---------------------------------------

[](#converting-from-collectionjson-to-json)

Take a look at the class `CollectionJsonToJson`.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

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 ~187 days

Recently: every ~653 days

Total

18

Last Release

1204d ago

PHP version history (2 changes)0.1PHP &gt;=5.3.0

0.9.0PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/79476f3b82f9c766433c7eb401cbcfc636cd5d5ccf2b2e6b50ea81d1de6c2730?d=identicon)[aklump](/maintainers/aklump)

---

Top Contributors

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

---

Tags

jsonhypermediavnd.collectionamundsen

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aklump-collection-json/health.svg)

```
[![Health](https://phpackages.com/badges/aklump-collection-json/health.svg)](https://phpackages.com/packages/aklump-collection-json)
```

###  Alternatives

[justinrainbow/json-schema

A library to validate a json schema.

3.6k316.9M612](/packages/justinrainbow-json-schema)[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[jms/serializer

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

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

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[colinodell/json5

UTF-8 compatible JSON5 parser for PHP

30422.2M45](/packages/colinodell-json5)[clue/ndjson-react

Streaming newline-delimited JSON (NDJSON) parser and encoder for ReactPHP.

15267.7M16](/packages/clue-ndjson-react)

PHPackages © 2026

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