PHPackages                             ulrack/codec - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ulrack/codec

Abandoned → [grizz-it/codec](/?search=grizz-it%2Fcodec)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

ulrack/codec
============

Encoding and decoding for PHP applications.

1.0.1(6y ago)01031MITPHPPHP ^7.2

Since Sep 15Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ulrack/codec)[ Packagist](https://packagist.org/packages/ulrack/codec)[ RSS](/packages/ulrack-codec/feed)WikiDiscussions master Synced 3d ago

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

DEPRECATION NOTICE: this package has been moved an improved at [grizz-it/codec](https://github.com/grizz-it/codec)
==================================================================================================================

[](#deprecation-notice-this-package-has-been-moved-an-improved-at-grizz-itcodec)

[![Build Status](https://camo.githubusercontent.com/7b462d66cc055bc892f3cfac9bf5b4472b74e3d8b6eda4c1d39a142a12fff344/68747470733a2f2f7472617669732d63692e636f6d2f756c7261636b2f636f6465632e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/ulrack/codec)

Ulrack Codec
============

[](#ulrack-codec)

This package contains Encoding and Decoding interfaces, including a codec for JSON and YAML.

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

[](#installation)

To install the package run the following command:

```
composer require ulrack/codec

```

Usage
-----

[](#usage)

Two implementations are provided in this package.

### [JsonCodec](src/Component/JsonCodec.php)

[](#jsoncodec)

This class provides a encoder and decoder in one implementation. In the constructor, additional options can be configured.

A simple encode/decode example looks like:

```
