PHPackages                             alcamo/rdf-literal-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. alcamo/rdf-literal-serializer

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

alcamo/rdf-literal-serializer
=============================

(De)serialization of RDF literals

0.2.1(2w ago)0171Apache-2.0PHPPHP 7.3 - 8.5

Since Jul 9Pushed 2w agoCompare

[ Source](https://github.com/rv1971/alcamo-rdf-literal-serializer)[ Packagist](https://packagist.org/packages/alcamo/rdf-literal-serializer)[ RSS](/packages/alcamo-rdf-literal-serializer/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (8)Versions (9)Used By (1)

Usage example
=============

[](#usage-example)

```
namespace alcamo\rdf_literal_serializer;

use alcamo\rdf_literal\NonNegativeIntegerLiteral;

include $_composer_autoload_path ?? __DIR__ . '/../vendor/autoload.php';

$serializer = AbstractSerializer::createFromProps(
    [
        'class'       => NonNegativeIntegerSerializer::class,
        'encoding'    => 'EBCDIC',
        'lengthRange' => [ 6, null ]
    ]
);

$literal1 = new NonNegativeIntegerLiteral(123);

$serialization = $serializer->serialize($literal1);

echo "Hexdump of EBCDIC: " . bin2hex($serialization) . PHP_EOL;

$literal2 = $serializer->deserialize($serialization);

echo "Deserialized to: $literal2" . PHP_EOL;

```

This example is contained in this package as a file in the `bin`directory. It will output

```
Hexdump of EBCDIC: f0f0f0f1f2f3
Deserialized to: 123

```

The purpose of this package is to provide *configurable*(de)serialization of RDF literal objects (see [alcamo/rdf-literal](https://github.com/rv1971/alcamo-rdf-literal)). Most serialization methods are rather trivial as such; the added value is the fact that the serialization parameters are completely configurable. As in the above example, in most cases at least the following are configurable:

- The serializer class - the right class depends on the dataype of the literal.
- The encoding.
- The length of the output.

See the doxygen documentation for details.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance96

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity46

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

Total

8

Last Release

18d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

serializerRDFdatatypedeserializerliteral

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/alcamo-rdf-literal-serializer/health.svg)

```
[![Health](https://phpackages.com/badges/alcamo-rdf-literal-serializer/health.svg)](https://phpackages.com/packages/alcamo-rdf-literal-serializer)
```

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k280.1M363](/packages/masterminds-html5)[goetas-webservices/xsd2php-runtime

Convert XSD (XML Schema) definitions into PHP classes

4913.3M49](/packages/goetas-webservices-xsd2php-runtime)[wikimedia/purtle

Fast streaming RDF serializer

11745.5k3](/packages/wikimedia-purtle)[aksw/erfurt

PHP/Zend based Semantic Web API for Social Semantic Software

416.8k1](/packages/aksw-erfurt)

PHPackages © 2026

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