Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
MAXakaWIZARD committed Apr 30, 2015
1 parent 4c25679 commit 4b4daa4
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,42 @@
[![License](https://img.shields.io/packagist/l/maxakawizard/json-collection-parser.svg)](https://packagist.org/packages/maxakawizard/json-collection-parser)

Event-based parser for large JSON collections (consumes small amount of memory).
Collection must be an array of objects.
Built on top of [JSON Streaming Parser](https://github.com/salsify/jsonstreamingparser)

This package is compliant with [PSR-4](http://www.php-fig.org/psr/4/), [PSR-1](http://www.php-fig.org/psr/1/), and [PSR-2](http://www.php-fig.org/psr/2/).
If you notice compliance oversights, please send a patch via pull request.

## Input data format
Collection must be an array of objects.
```javascript
[
{
"id": 78,
"title": "Title",
"dealType": "sale",
"propertyType": "townhouse",
"properties": {
"bedroomsCount": 6,
"parking": "yes"
},
"photos": [
"1.jpg",
"2.jpg"
]
},
{
"id": 729,
"dealType": "rent_long",
"propertyType": "villa"
},
{
"id": 5165,
"dealType": "rent_short",
"propertyType": "villa"
}
]
```

## Usage
Function as callback:
```php
Expand Down

0 comments on commit 4b4daa4

Please sign in to comment.