A fast json parser written in C++
C++ Shell Python Makefile M4 CMake C
Switch branches/tags
Nothing to show
Clone or download
jkriegshauser - Fix warnings/errors on more pedantic compilers (gcc & clang, primar…
…ily for ORBIS (PS4) builds)

- Converted tabs to spaces
- The error handler instance is now initialized with the document and can be queried. The unittest/without_exceptions.cpp has an example on how to use setjmp/longjmp as an error handler.
Latest commit 1f835d3 Apr 12, 2017

README.md

fastjson

by Joshua M. Kriegshauser (jkriegshauser -at- gmail -dot- com)

A fast json parser written in C++ Inspired by rapidxml (http://rapidxml.sourceforge.net/)

Getting Started

A simple example:

#include <iostream>
#include <fastjson.hpp>

int main(int argc, char** argv)
{
    const char* json = "{ \"name\": \"hello world!\" }";

    fastjson::json_document<> doc;
    try
    {
        doc.parse<0>((void*)json, std::size_t(-1), fastjson::utf8);
        std::cout << "name: " << doc.root()["name"] << std::endl;
    }
    catch (fastjson::parse_error e)
    {
    }

    return 0;
}