Skip to content

midnite81/json-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JsonParser for PHP Latest Stable Version Total Downloads Latest Unstable Version License Build Coverage Status

This package allows for Error Handling while encoding and decoding JSON.

To install through composer include the package in your composer.json.

"midnite81/json-parser": "^1.0.0"

Run composer install or composer update to download the dependencies or you can run composer require midnite81/json-parser.

Example usage

use Midnite81\JsonParser\JsonParse;

public function returnData() 
{ 
    // your encoded data 
    $myData = '{"message":"Hello World"}'; 
    
    try { 
        JsonParse::decode($myData);
    } catch (JsonException $e) { 
        die('Something went wrong: ' . $e->getMessage());
    }
}

About

A package to parse JSON in php with Error Handling

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages