use Ahc\Json\Comment;
// The JSON string!
$someJsonText = '{"a":1,
"b":2,// comment
"c":3 /* inline comment */,
// comment
"d":/* also a comment */"d",
/* creepy comment*/"e":2.3,
/* multi line
comment */
"f":"f1"}';
// OR
$someJsonText = file_get_contents('...');
// Strip only!
(new Comment)->strip($someJsonText);
// Strip and decode!
(new Comment)->decode($someJsonText);
// You can pass args like in `json_decode`
(new Comment)->decode($someJsonText, $assoc = true, $depth = 512, $options = JSON_BIGINT_AS_STRING);
// Or you can use static alias of decode:
Comment::parse($json, true);