nlib
|
The library used to implement the MessagePack serializer, the JSON parser/writer, and the CSV parser. More...
Namespaces | |
jsonrpc | |
Implements JSON-RPC 2.0. | |
Classes | |
class | CsvReader |
CSV parser. Reads and parses the CSV string from the stream. More... | |
class | JsonStreamGenerator |
Class for outputting JSON or msgpack. More... | |
struct | JsonStreamGeneratorSettings |
Data structure used to store the JsonStreamGenerator settings parameters. More... | |
class | JsonStreamParser |
The class to parse JSON or msgpack in a pull manner. More... | |
struct | JsonStreamParserSettings |
Data structure used to store the JsonStreamParser settings parameters. More... | |
class | MpObject |
Object created when MessagePack or JSON is read. More... | |
struct | MpObjectKv |
A pair consisting of an MpObject -type key and value. Used to store an associative array. More... | |
class | MpWalker |
Quickly accesses MessagePack expanded in memory. More... | |
struct | nil |
Class that corresponds to nil in MessagePack and null in JSON. More... | |
Functions | |
template<class T > | |
bool | operator== (const nil &lhs, const T &rhs) noexcept |
Returns false if rhs is a non-nil object. | |
template<class T > | |
bool | operator== (const T &lhs, const nil &rhs) noexcept |
Returns false if lhs is a non-nil object. | |
bool | operator== (const nil &lhs, const nil &rhs) noexcept |
Returns true . | |
template<class T > | |
bool | operator!= (const nil &rhs, const T &lhs) noexcept |
Returns true if rhs is a non-nil object. | |
template<class T > | |
bool | operator!= (const T &rhs, const nil &lhs) noexcept |
Returns true if lhs is a non-nil object. | |
bool | operator!= (const nil &rhs, const nil &lhs) noexcept |
Returns false . | |
bool | operator== (const MpObjectKv &lhs, const MpObjectKv &rhs) noexcept |
Recursively compares lhs and rhs and returns true if they are equal. | |
bool | operator!= (const MpObject &lhs, const MpObject &rhs) noexcept |
Recursively compares lhs and rhs and returns false if they are equal. | |
bool | operator!= (const MpObjectKv &lhs, const MpObjectKv &rhs) noexcept |
Recursively compares lhs and rhs and returns false if they are equal. | |
MpObject | |
Free function that handles | |
template<class T > | |
errno_t | Box (MpObject *obj, const T &v) |
This function template can be specialized to define boxing the user type. More... | |
template<class T > | |
errno_t | Unbox (const MpObject *obj, T *v) |
This function template can be specialized to define unboxing the user type. More... | |
bool | operator== (const MpObject &lhs, const MpObject &rhs) |
The two MpObject s are recursively compared. Returns true if they are equivalent. More... | |
The library used to implement the MessagePack serializer, the JSON parser/writer, and the CSV parser.
MessagePack is one format for binary-based object serialization. MessagePack can make data transfers smaller, faster, and more flexible. The data format is similar to JSON translated into binary. MessagePack is commonly used to speed up JSON processing. Like JSON, MessagePack can be written and read in various environments such as Perl, Python, and Ruby. As a result, MessagePack can be used to communicate between different environments and languages.
nn::nlib::msgpack
contains the serializer and deserializer, the JSON parser, and the JSON generator that supports MessagePack. MessagePack data and JSON data is converted into the same data format after being read. This allows you to read JSON data and save it as MessagePack, or vice versa.msgpack
library only understands UTF-8. uint64_t
), signed integer (int64_t
), and floating point value (double
). Any value that is over 19 digits long, not including the sign, is read as a floating point type. Reading the actual value is implemented using the nlib_strto_int32()
function, etc. We suggest handling values as strings instead of numerical values, as different JSON processors may not have uniform behavior handling very large values in JSON. nn::nlib::msgpack::Box | ( | MpObject * | obj, |
const T & | v | ||
) |
This function template can be specialized to define boxing the user type.
T | Type of object to be boxed. |
[in] | obj | Object to store the boxed data. |
[in] | v | Object to be boxed. |
0
on success.MpObject
. NULL
value. 0
must be returned when boxing is successful, and a non-zero value must be returned when it is not successful. The two MpObject
s are recursively compared. Returns true
if they are equivalent.
Recursively compares lhs and rhs and returns true
if they are equal.
true
if they are equivalent.nn::nlib::msgpack::Unbox | ( | const MpObject * | obj, |
T * | v | ||
) |
This function template can be specialized to define unboxing the user type.
T | Object to store the data that has been unboxed. |
[in] | obj | Object that stores the boxed data. |
[in] | v | Object to store the unboxed data. |
0
on success.NULL
value. 0
must be returned when unboxing is successful, and a non-zero value must be returned when it is not successful. © 2012-2016 Nintendo Co., Ltd. All rights reserved.