A fast json parser written in C++
C++ C Shell Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
gtest-1.6.0
unittest
.gitignore
Doxyfile
LICENSE
README.md
fastjson.hpp
fastjson.sln
fastjson.vcxproj
fastjson.vcxproj.filters
fastjson_print.hpp

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;
}