Skip to content

Commit

Permalink
docs: add trailing comma support
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Apr 5, 2021
1 parent b9e3201 commit 7d5e2d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
- Lightweight JSON comment stripper library for PHP.
- Makes possible to have comment in any form of JSON data.
- Supported comments: single line `// comment` or multi line `/* comment */`.
- Also strips trailing comma at the end of array or object, eg:
- `[1,2,,]` => `[1,2]`
- `{"x":1,,}` => `{"x":1}`

## Installation
```bash
Expand All @@ -30,7 +33,7 @@ $someJsonText = '{"a":1,
/* creepy comment*/"e":2.3,
/* multi line
comment */
"f":"f1"}';
"f":"f1",}';

// OR
$someJsonText = file_get_contents('...');
Expand Down

0 comments on commit 7d5e2d2

Please sign in to comment.