Kobato is a small JSON parser, consisting of a single header file written in C++.
Kobato is made available by simply including the header file in C++ files.
#include "kobato.h"
kobato::Value
is an object that is the result of parsing a JSON string.
Return a reference to the object that the Value object is wrapping.
Set the specified value to a Value object and return the reference.
kobato::String
is a string type, an alias of std::string
.
kobato::Number
is a numeric type, an alias of double
.
kobato::Boolean
is a boolean type, an alias of bool
.
kobato::Null
is a null type.
kobato::Array
is an array type, an alias of std::vector<kobato::Value>
.
kobato::Object
is a JSON object type (kay-value pairs), an alias of std::map<kobato::String, kobato::Value>
.
Parse()
returns a kobato object value_ptr
obtained as a result of parsing the JSON string s
.
On success, it returns kOK
, otherwise it returns kInvalidToken
.