PHPackages                             ask/serialization - 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. ask/serialization

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

ask/serialization
=================

Library containing serializers and deserializers for the PHP implementation of the Ask query language

1.0.3(11y ago)12.6k11GPL-2.0+PHPPHP &gt;=5.3.0

Since Dec 5Pushed 5y ago13 watchersCompare

[ Source](https://github.com/wmde/AskSerialization)[ Packagist](https://packagist.org/packages/ask/serialization)[ Docs](https://github.com/wmde/AskSerialization)[ RSS](/packages/ask-serialization/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (4)Versions (5)Used By (1)

This library is no longer under development and is no longer maintained.

Ask Serialization
=================

[](#ask-serialization)

Library containing serializers and deserializers for the PHP implementation of the [Ask query language](https://github.com/wmde/Ask).

[![Build Status](https://camo.githubusercontent.com/076c048f5e752061b24e3e93108693a3ded80ca52137b3ee9abc56e4cd8b0a5d/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f776d64652f41736b53657269616c697a6174696f6e2e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/wmde/AskSerialization)[![Code Coverage](https://camo.githubusercontent.com/3c58c1a9c3c396cade88ec7659036c6d4391e09b8384f57826e99955dc375d47/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f776d64652f41736b53657269616c697a6174696f6e2f6261646765732f636f7665726167652e706e673f733d34353163386565303734383233653161396364623663653265383931663666393937393531396431)](https://scrutinizer-ci.com/g/wmde/AskSerialization/)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/969d96785b082c3f2c75b9469be277ee1c68d88d6cdc83f7fb11952aeadf607c/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f776d64652f41736b53657269616c697a6174696f6e2f6261646765732f7175616c6974792d73636f72652e706e673f733d61356132326366656535336663396239626362396664376332376337343839666232666262363134)](https://scrutinizer-ci.com/g/wmde/AskSerialization/)[![Dependency Status](https://camo.githubusercontent.com/263c757250f737e88ab7cc8fdba7024b1c42666f2fc7f72acc03114f833460b7/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f61736b3a73657269616c697a6174696f6e2f6465762d6d61737465722f62616467652e706e67)](https://www.versioneye.com/php/ask:serialization)

On Packagist: [![Latest Stable Version](https://camo.githubusercontent.com/5690a0b8437d6f018239d25277d338a5e481e7e348c2d745dde8e71d588c92a0/68747470733a2f2f706f7365722e707567782e6f72672f61736b2f73657269616c697a6174696f6e2f76657273696f6e2e706e67)](https://packagist.org/packages/ask/serialization)[![Download count](https://camo.githubusercontent.com/ba0459637983cd52abbaaf7f2911d0b5f8eb4b7f989e63ce95e4d34feebaa40e/68747470733a2f2f706f7365722e707567782e6f72672f61736b2f73657269616c697a6174696f6e2f642f746f74616c2e706e67)](https://packagist.org/packages/ask/serialization)

Installation
------------

[](#installation)

You can use [Composer](http://getcomposer.org/) to download and install this package as well as its dependencies. Alternatively you can simply clone the git repository and take care of loading yourself.

To add this package as a local, per-project dependency to your project, simply add a dependency on `ask/serialization` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on Ask 1.0:

```
{
    "require": {
        "ask/serialization": "1.0.*"
    }
}

```

Library structure
-----------------

[](#library-structure)

The Ask language objects can all be serialized to a generic format from which the objects can later be reconstructed. This is done via a set of `Serializers/Serializer` implementing objects. These objects turn for instance a Query object into a data structure containing only primitive types and arrays. This data structure can thus be readily fed to json\_encode, serialize, or the like. The process of reconstructing the objects from such a serialization is provided by objects implementing the `Deserializers/Deserializer` interface.

Serializers can be obtained via an instance of `SerializerFactory` and deserializers can be obtained via an instance of `DeserializerFactory`. You are not allowed to construct these serializers and deserializers directly yourself or to have any kind of knowledge of them (ie type hinting). These objects are internal to the Ask library and might change name or structure at any time. All you are allowed to know when calling `$serializerFactory->newQuerySerializer()` is that you get back an instance of `Serializers\Serializer`.

Tests
-----

[](#tests)

This library comes with a set up PHPUnit tests that cover all non-trivial code. You can run these tests using the PHPUnit configuration file found in the root directory. The tests can also be run via TravisCI, as a TravisCI configuration file is also provided in the root directory.

Authors
-------

[](#authors)

Ask has been written by [Jeroen De Dauw](https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw)as [Wikimedia Germany](https://wikimedia.de) employee for the [Wikidata project](https://wikidata.org/).

Release notes
-------------

[](#release-notes)

### 1.0.3 (2014-11-25)

[](#103-2014-11-25)

Installation together with DataValues 1.x is now supported.

### 1.0.2 (2014-07-24)

[](#102-2014-07-24)

- When loaded with MediaWiki, this library now shows up under "other" on Special:Version
- Switched class loading from PSR-0 to PSR-4

### 1.0.1 (2014-04-02)

[](#101-2014-04-02)

- Switched to using version 3.x of Serialization and version 1.x of DataValues Serialization.

### 1.0 (2013-12-05)

[](#10-2013-12-05)

Initial release with these features:

- Serializers for all implemented Ask language objects
- Deserializers for all implemented Ask language objects

Links
-----

[](#links)

- [AskSerialization on Packagist](https://packagist.org/packages/ask/serialization)
- [AskSerialization on Ohloh](https://www.ohloh.net/p/ask)
- [AskSerialization on ScrutinizerCI](https://scrutinizer-ci.com/g/wmde/AskSerialization/)
- [TravisCI build status](https://travis-ci.org/wmde/AskSerialization)
- [Ask library](https://github.com/wmde/Ask)
- [NodeJS implementation of Ask](https://github.com/JeroenDeDauw/AskJS)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 84.9% 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 ~118 days

Total

4

Last Release

4189d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/451bd4039d530fed8f9c3da91bfa519233a397d2182cdfdcad700f6cfea19b7f?d=identicon)[Jeroen De Dauw](/maintainers/Jeroen%20De%20Dauw)

![](https://www.gravatar.com/avatar/5406ed1d40d50ffc61d67e9f5149914dbfe0b8a52bdf297299f5ccfab0a73d91?d=identicon)[thiemowmde](/maintainers/thiemowmde)

---

Top Contributors

[![JeroenDeDauw](https://avatars.githubusercontent.com/u/146040?v=4)](https://github.com/JeroenDeDauw "JeroenDeDauw (231 commits)")[![translatewiki](https://avatars.githubusercontent.com/u/24829418?v=4)](https://github.com/translatewiki "translatewiki (21 commits)")[![addshore](https://avatars.githubusercontent.com/u/3308769?v=4)](https://github.com/addshore "addshore (8 commits)")[![tobijat](https://avatars.githubusercontent.com/u/2997252?v=4)](https://github.com/tobijat "tobijat (4 commits)")[![DanweDE](https://avatars.githubusercontent.com/u/101926?v=4)](https://github.com/DanweDE "DanweDE (2 commits)")[![mariushoch](https://avatars.githubusercontent.com/u/2446964?v=4)](https://github.com/mariushoch "mariushoch (2 commits)")[![thiemowmde](https://avatars.githubusercontent.com/u/6576639?v=4)](https://github.com/thiemowmde "thiemowmde (2 commits)")[![manicki](https://avatars.githubusercontent.com/u/3524114?v=4)](https://github.com/manicki "manicki (1 commits)")[![adrianheine](https://avatars.githubusercontent.com/u/139208?v=4)](https://github.com/adrianheine "adrianheine (1 commits)")

---

Tags

serializationdeserializationwikidataSMWSemantic MediaWikiask

### Embed Badge

![Health badge](/badges/ask-serialization/health.svg)

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

###  Alternatives

[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)[flix-tech/avro-serde-php

A library to serialize and deserialize Avro records making use of the confluent schema registry

674.0M17](/packages/flix-tech-avro-serde-php)

PHPackages © 2026

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