nuxed/json

This package is abandoned and no longer maintained. No replacement package was suggested.

Nuxed Json

Maintainers

Package info

github.com/nuxed/json

Language:Hack

pkg:composer/nuxed/json

Statistics

Installs: 665

Dependents: 3

Suggesters: 0

Stars: 1

Open Issues: 0

v2.0.1 2020-11-22 16:12 UTC

This package is auto-updated.

Last update: 2025-08-23 02:27:16 UTC


README

Coding standards status Static analysis status Unit tests status Total Downloads Latest Stable Version License

Nuxed Json

The Nuxed Json component provides functions that help you encode, and decode json structures safely.

Installation

This package can be installed with Composer.

$ composer require nuxed/json

Example

use namespace Nuxed\Json;
use namespace Facebook\TypeSpec;

<<__EntryPoint>>
async function main(): Awaitable<void> {
  $data = Json\encode(dict[
    'foo' => 5,
    'bar' => 6
  ]);

  // using reified generics.
  $decoded = Json\typed<dict<string, int>>($data);

  // using type spec.
  $decoded = Json\spec($data, TypeSpec\dict(
    TypeSpec\string(), TypeSpec\int();
  ));
}

Security

For information on reporting security vulnerabilities in Nuxed, see SECURITY.md.

License

Nuxed is open-sourced software licensed under the MIT-licensed.