We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9e3201 commit 7d5e2d2Copy full SHA for 7d5e2d2
README.md
@@ -11,6 +11,9 @@
11
- Lightweight JSON comment stripper library for PHP.
12
- Makes possible to have comment in any form of JSON data.
13
- Supported comments: single line `// comment` or multi line `/* comment */`.
14
+- Also strips trailing comma at the end of array or object, eg:
15
+ - `[1,2,,]` => `[1,2]`
16
+ - `{"x":1,,}` => `{"x":1}`
17
18
## Installation
19
```bash
@@ -30,7 +33,7 @@ $someJsonText = '{"a":1,
30
33
/* creepy comment*/"e":2.3,
31
34
/* multi line
32
35
comment */
-"f":"f1"}';
36
+"f":"f1",}';
37
38
// OR
39
$someJsonText = file_get_contents('...');
0 commit comments