New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

inerciacreativa/json

PHP class for working with JSON objects
5

Larablocks Analysis

inerciacreativa/json works with any PHP project: the latest release (v1.0.0, May 4, 2023) doesn't depend on Laravel.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • No release in the last 12 months (last: May 4, 2023)
  • 0 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: May 4, 2023.
  • No releases in the last 12 months.
  • First released: May 4, 2023.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 2, 2026.

Install
composer require inerciacreativa/json
Latest Version:v1.0.0
PHP:>=8.0
License:MIT
Last Updated:May 4, 2023
Links: GitHub  ·  Packagist
Maintainer: inerciacreativa

IC JSON

The package provides methods to encode and decode JSON.

  • It has sensible defaults, so you don't have to specify flags all the time.
  • It has handy method to encode for HTML safely.
  • It throws \IC\Json\Exception\JsonEncodeException when encoding fails.
  • It throws \IC\Json\Exception\JsonDecodeException when decoding fails.
  • It handles \JsonSerializable, \DateTimeInterface, and \SimpleXMLElement well.

Requirements

  • PHP 8.0 or higher.
  • SimpleXML PHP extension.

Installation

The package could be installed with composer:

composer require inerciacreativa/json --prefer-dist

General usage

Encoding:

use \IC\Json\Json;

$data = ['name' => 'Jose', 'team' => 'Inercia Creativa'];
$json = Json::encode($data);

Encoding for HTML:

use \IC\Json\Json;

$data = ['name' => 'Jose', 'team' => 'Inercia Creativa'];
$json = Json::htmlEncode($data);

Decoding:

use \IC\Json\Json;

$json = '{"name":"Jose","team":"Inercia Creativa"}';
$data = Json::decode($json);

Testing

Unit testing

The package is tested with PHPUnit. To run tests:

composer phpunit

Static analysis

The code is statically analyzed with PHPStan. To run static analysis:

composer phpstan

License

The IC JSON is free software. It is released under the terms of the MIT License. Please see LICENSE for more information.

Maintained by Inercia Creativa.

Related Packages

valorin/random

Random is a simple helper package designed to make it easy to generate a range o...

479,812 234
php
cline/variable-keys

Laravel Blueprint macros for variable primary key and morph types

26,787 0
php
cline/struct

Lean, attribute-driven Laravel data objects with explicit validation and Eloquen...

22,365 0
php
cline/toggl

Advanced feature flag management with strategies, time bombs, and groups

15,405 0
php
cline/sequencer

Sequential migration and operation orchestration for Laravel

14,448 0
php

Version History

Version Released PHP License
v1.0.0 >=8.0 MIT