Skip to content

finagin/json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON class for PHP 7.3 and up

Latest Version on Packagist StyleCI Total Downloads
GitHub stars

Installation

This package can be used with PHP 7.3 or higher. You can install the package via composer:

composer require finagin/json

Usage

use Finagin\Json\Facades\Json;

try {
    // decode as object
    Json::decode($fromJson);
    Json::decodeAsObject($fromJson);
    
    // decode as array
    Json::decode($fromJson, 0, true);
    Json::decodeAsArray($fromJson);
    
    Json::encode($toJson, JSON_PRETTY_PRINT);
} catch (\JsonException $exception) {
    //
}

License

The MIT License (MIT). Please see License File for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Languages