To be fair, JSON is much, much simpler to parse than SQL.
I've written a SPARQL query parser, which is somewhat similar to SQL. Parsing the string into your internal memory representation is not the hard part of writing a query engine. It's really not difficult to transform SQL into the JSON/SQL shown in the article.
It could also parse the SQL query.