Parse JSON coming from jQuery QueryBuilder, such as
{
"condition": "AND",
"rules": [
{
"id": "price",
"field": "price",
"type": "double",
"input": "text",
"operator": "less",
"value": "10.25"
}
]
} $ composer require fourlabs/qbjs-parserFL\QBJSParser\Serializer\JsonDeserializer::deserialize()deserializes a JSON string into an instance ofFL\QBJSParser\Model\RuleGroup- This
RuleGroupobject can then be parsed into something your ORM/ODM can use, to create a query. - Parsers live at
FL\QBJSParser\Parser.
To run the test suite, you need composer.
$ composer install
$ phpunitQBJSParser is licensed under the MIT license.