- Aldebaran documentation |
- C++ Libraries |
- index

libqi-api 2.8.7.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
jsoncodec.hpp
Go to the documentation of this file.
1 #pragma once
2 /*
3 ** Copyright (C) 2013 Aldebaran Robotics
4 ** See COPYING for the license
5 */
6
7 #ifndef _QI_TYPE_JSONCODEC_HPP_
8 #define _QI_TYPE_JSONCODEC_HPP_
9
10 #include <qi/api.hpp>
11 #include <qi/anyvalue.hpp>
12
13 namespace qi {
14
15 // Do not use enum here because we want to pipe those values and we don't want to cast them each time we pipe them
16 using JsonOption = unsigned int;
17 const JsonOption JsonOption_None = 0;
18 const JsonOption JsonOption_PrettyPrint = 1;
19 const JsonOption JsonOption_Expand = 2;
20
25 QI_API std::string encodeJSON(const qi::AutoAnyReference &val, JsonOption jsonPrintOption = JsonOption_None);
26
32 QI_API qi::AnyValue decodeJSON(const std::string &in);
33
41 QI_API std::string::const_iterator decodeJSON(const std::string::const_iterator &begin,
42 const std::string::const_iterator &end,
43 AnyValue &target);
44
45
46
47 }
48
49 #endif // _QITYPE_JSONCODEC_HPP_
qi::AnyValue
Definition: anyvalue.hpp:19
QI_API
#define QI_API
Definition: api.hpp:33
api.hpp
dll import/export and compiler message
qi::JsonOption
unsigned int JsonOption
Definition: jsoncodec.hpp:16
anyvalue.hpp
qi::JsonOption_Expand
const JsonOption JsonOption_Expand
Definition: jsoncodec.hpp:19
qi::JsonOption_PrettyPrint
const JsonOption JsonOption_PrettyPrint
Definition: jsoncodec.hpp:18
qi::JsonOption_None
const JsonOption JsonOption_None
Definition: jsoncodec.hpp:17
qi::decodeJSON
qi::AnyValue decodeJSON(const std::string &in)
qi::AutoAnyReference
Definition: anyreference.hpp:409
qi::encodeJSON
std::string encodeJSON(const qi::AutoAnyReference &val, JsonOption jsonPrintOption=JsonOption_None)