easeappphp/json-decode

This is to do json_decode operation only on valid json string and in a highly performing way.

1.0.3 2023-09-06 12:35 UTC

This package is auto-updated.

Last update: 2024-04-06 14:10:26 UTC


README

This is to do json_decode operation only on valid json string and in a highly performing way.

Inspirations

Inspired from discussion that I came across on a stackoverflow thread, specifically posts by

and implemented this library, to check if an input is a valid JSON string and likewise to also provide the json decoded content (array or object), as per choice, and when using specific methods for the purpose. More example inputs are considered, to make the implementation more robust while offer good performance. Benchmarks are yet to be made.

Getting started

With Composer, run

composer require easeappphp/json-decode :^1.0.3

License

This software is distributed under the MIT license. Please read LICENSE for information on the software availability and distribution.