Skip to content

Commit 4fa0d55

Browse files
committed
docs: readme
0 parents  commit 4fa0d55

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

readme.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## adhocore/json-comment [![build status](https://travis-ci.org/adhocore/json-comment.svg?branch=master)](https://travis-ci.org/adhocore/json-comment)
2+
3+
- Lightweight JSON comment stripper library for PHP.
4+
- Makes possible to have comment in any form of JSON data.
5+
6+
## Installation
7+
```bash
8+
composer require adhocore/json-comment
9+
```
10+
11+
## Usage
12+
```php
13+
use Ahc\Json\Comment;
14+
15+
// The JSON string!
16+
$someJsonText = '{...}';
17+
$someJsonText = file_get_contents('...'');
18+
19+
// Strip only!
20+
(new Comment)->strip($someJsonText);
21+
22+
// Strip and decode!
23+
(new Comment)->decode($someJsonText);
24+
```

0 commit comments

Comments
 (0)