Argo  1.0
A C++ library for handling JSON.
Static Public Member Functions | List of all members
argo::utf8 Class Reference

Methods to convert JSON format string to UTF-8 and vice-versa. More...

#include <utf8.hpp>

Static Public Member Functions

static std::unique_ptr< std::string > json_string_to_utf8 (const std::string &src)
 
static std::unique_ptr< std::string > utf8_to_json_string (const std::string &src)
 

Detailed Description

Methods to convert JSON format string to UTF-8 and vice-versa.

This only really exists because the C++ standard libraries for this are not widely implemented yet.

Definition at line 41 of file utf8.hpp.

Member Function Documentation

unique_ptr< string > utf8::json_string_to_utf8 ( const std::string &  src)
static

Create a UTF-8 encoded string from a JSON string. Allocated dynamically to reduce copying.

Parameters
srcA string in JSON format. E.g. "jkhjkh\uAABB\t".

Definition at line 163 of file utf8.cpp.

unique_ptr< string > utf8::utf8_to_json_string ( const std::string &  src)
static

Create a JSON encoded string from a UTF-8 string. Allocated dynamically to reduce copying.

Parameters
srcA UTF-8 string.

Definition at line 241 of file utf8.cpp.


The documentation for this class was generated from the following files: