PHPackages                             nielpe87/parsing - 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. nielpe87/parsing

ActiveLibrary

nielpe87/parsing
================

A basic Base64Url and JSON encoding/decoding implementation

v1.0.0(3y ago)027BSD-3-ClausePHPPHP ^7.4 || ^8.0

Since Jun 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/nielpe87/parsing)[ Packagist](https://packagist.org/packages/nielpe87/parsing)[ RSS](/packages/nielpe87-parsing/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Object Signing and Encoding Parsing
===================================

[](#object-signing-and-encoding-parsing)

A base64Url and JSON encoding/decoding implementation.

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

[](#installation)

Package is available on [Packagist](https://packagist.org/packages/nielpe87/parsing), you can install it using [Composer](http://getcomposer.org).

```
composer require nielpe87/parsing
```

Usage
-----

[](#usage)

You probably won't need to depend on this library directly. However, feel free to use its base64url and JSON (with some extra validation) encoding/decoding.

### Encoding

[](#encoding)

```
use Nielpe87\Parsing\Parser;

$bilboQuote = "It’s a dangerous business, Frodo, going out your door. You step "
            . "onto the road, and if you don't keep your feet, there’s no knowing "
            . "where you might be swept off to.";

$encoder = new Parser();
echo $encoder->jsonEncode(['testing' => 'test']); // {"testing":"test"}
echo $encoder->base64UrlEncode($bilboQuote);

/*
  That quote is used in RFC 7520 example (in UTF-8 encoding, sure),
  and the output is (line breaks added for readbility):

  SXTigJlzIGEgZGFuZ2Vyb3VzIGJ1c2luZXNzLCBGcm9kbywgZ29pbmcgb3V0IHlvdXIgZG9vci4gWW
  91IHN0ZXAgb250byB0aGUgcm9hZCwgYW5kIGlmIHlvdSBkb24ndCBrZWVwIHlvdXIgZmVldCwgdGhl
  cmXigJlzIG5vIGtub3dpbmcgd2hlcmUgeW91IG1pZ2h0IGJlIHN3ZXB0IG9mZiB0by4
 */
```

### Decoding

[](#decoding)

```
use Nielpe87\Parsing\Parser;

$bilboQuote = "SXTigJlzIGEgZGFuZ2Vyb3VzIGJ1c2luZXNzLCBGcm9kbywgZ29pbmcgb3V0IHlvdXIgZG9vci4gWW"
            . "91IHN0ZXAgb250byB0aGUgcm9hZCwgYW5kIGlmIHlvdSBkb24ndCBrZWVwIHlvdXIgZmVldCwgdGhl"
            . "cmXigJlzIG5vIGtub3dpbmcgd2hlcmUgeW91IG1pZ2h0IGJlIHN3ZXB0IG9mZiB0by4";

$decoder = new Parser();
var_dump($decoder->jsonDecode('{"testing":"test"}')); // object(stdClass)#1 (1) { ["testing"] => string(4) "test" }
echo $decoder->base64UrlDecode($bilboQuote);

/*
  The output would be the same as the quote used in previous example:

  "It’s a dangerous business, Frodo, going out your door. You step "
  "onto the road, and if you don't keep your feet, there’s no knowing "
  "where you might be swept off to."
 */
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Unknown

Total

1

Last Release

1423d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4005dcf5cf3f8b8aef2b6c0ed9d8f8253e6093971f574c6ec7ad8fea9ad224fd?d=identicon)[nielpe87](/maintainers/nielpe87)

---

Top Contributors

[![nielpe87](https://avatars.githubusercontent.com/u/57416103?v=4)](https://github.com/nielpe87 "nielpe87 (5 commits)")

---

Tags

base64urlEmanuel

### Embed Badge

![Health badge](/badges/nielpe87-parsing/health.svg)

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

PHPackages © 2026

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