Skip to content

Parse JSON coming from jQuery QueryBuilder into database queries. Remove final key words for private methods to be compatible with php 8.0

License

Notifications You must be signed in to change notification settings

B-Kluss/QBJSParser

 
 

Repository files navigation

Query Builder JS Parser

StyleCI Build Status Coverage Status License Total Downloads

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 of FL\QBJSParser\Model\RuleGroup
  • This RuleGroup object 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.

About

Parse JSON coming from jQuery QueryBuilder into database queries. Remove final key words for private methods to be compatible with php 8.0

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%