fourlabs / qbjs-parser
Parse JSON coming from jQuery QueryBuilder, into database queries.
Installs: 33 732
Dependents: 2
Suggesters: 0
Security: 0
Stars: 24
Watchers: 2
Forks: 16
Open Issues: 6
pkg:composer/fourlabs/qbjs-parser
Requires
- php: >=7.0
 - symfony/property-info: ~2.8|~3.0|~3.1|^4.0|^5.0
 
Requires (Dev)
This package is auto-updated.
Last update: 2025-10-11 06:51:49 UTC
README
Parse JSON coming from jQuery QueryBuilder, such as
{
   "condition": "AND",
   "rules": [
     {
       "id": "price",
       "field": "price",
       "type": "double",
       "input": "text",
       "operator": "less",
       "value": "10.25"
     }
   ]
 }
Installation
$ composer require fourlabs/qbjs-parser
Quick Tour
FL\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. 
Available Parsers
Tests
To run the test suite, you need composer.
    $ composer install
    $ phpunit
License
QBJSParser is licensed under the MIT license.