<?php
use Seld\JsonLint\JsonParser;
$json = '{
"name": "vendor/budgie-project",
"description": "Showing PHP code snippets and its executed code in your browser",
"require": {
"composer/composer": "1.0.*@dev",
},
"autoload": {
"psr-0": { "Budgie\\\\": "lib/" }
},
"minimum-stability": "dev"
}';
$parser = new JsonParser();
$lint = $parser->lint($json);
if (!is_null($lint)) {
// Seld\JsonLint\ParsingException
echo $lint->getMessage();
}
Result
Parse error on line 5:
...": "1.0.*@dev", }, "autoload": {
---------------------^
Expected: 'STRING' - It appears you have an extra trailing comma