BusBoy
2
Main Page
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
cpp
api
serialize
json
JanssonUtil.h
Go to the documentation of this file.
1
17
#ifndef __BUSBOY_JANSSON_UTIL_H__
18
#define __BUSBOY_JANSSON_UTIL_H__
19
20
#include <set>
21
#include <string>
22
#include <jansson.h>
23
24
namespace
BUSBOY {
25
26
class
JanssonUtil
{
27
28
public
:
29
30
static
std::string
toStringAndFree
(json_t* jsonObject);
31
32
static
json_t*
fromString
(
const
std::string& json);
33
34
static
json_t*
toJsonString
(
const
std::string& str);
35
36
static
std::string
fromJsonString
(
const
json_t* jsonString);
37
38
static
json_t*
stringSetToJson
(
const
std::set<std::string>& strs);
39
40
static
std::set<std::string>
stringSetFromJsonArray
(
const
json_t* jsonArray);
41
static
void
assertJsonType
(
const
json_t* json, json_type type);
42
43
private
:
44
45
// prevent calling these
46
JanssonUtil
();
47
JanssonUtil
(
const
JanssonUtil
& util);
48
JanssonUtil
& operator=(
const
JanssonUtil
& util);
49
50
51
};
52
53
}
54
#endif
55
Tue Nov 11 2014 23:19:41
1.8.3.1
Copyright 2014 Google Inc. All rights reserved.