- Recursive Descent Parser
- Tokenization using C++11 regex library
- Token types declared using C++17
std::variant - Parsing using concrete structure types
- Minimal overhead of token parsing
- Write to the standard output stream or a specified file
- Read input from the standard input stream or a specified file
- Complete unicode support
- Complete JSON parsing according to the JSON RFC
- Output using C++23
std::printandstd::println
- C++23 compatible compiler (gcc-14+ or clang-19+)
- Catch2 testing framework
$> mkdir build && cd build
$> cmake -DCMAKE_BUILD_TYPE=Release ..
$> cmake --build .
token- base class for token classesstring- JSON string tokens matched usingSTRINGSnumber- JSON number tokens matched usingNUMBERSseparator- JSON allowed character symbols matched usingSEPARATORStrue_token- JSONtruesymbol tokenfalse_token- JSONfalsesymbol tokennull- JSONnullsymbol token
json_value-std::variantclass representing all valid value typesjson_array- class representing the JSON array typearray_elements- collection ofjson_valuefor JSON values in an arrayjson_object- class representing the JSON object typejson_pair- class representing key value pairs in a JSON objectobject_members- collection of key-value pairs for a JSON object
<json> ::= <value><value> ::= <object> | <array> | "string" | "number" | <true> | <false> | <null><object> ::= "{" <members> "}"<members> ::= <pair> | <pair>, <members> | epsilon<pair> ::= "string" ":" <value><array> ::= "[" <elements> "]<elements> := <value> | <value>, <elements><true> ::= "true"<false> ::= "false"<null> ::= "null"