GAF Library
Generic Animation Format
 All Classes Functions Pages
CCJSONConverter.h
1 #pragma once
2 
3 #ifndef __CCJSONCONVERTER__H__
4 #define __CCJSONCONVERTER__H__
5 
6 #include "CCJSONData.h"
7 
8 struct cJSON;
9 
10 class CCJSONConverter : public CCObject {
11 
12 public:
13  static CCJSONConverter * sharedConverter();
14 
15  char * strFrom(CCDictionary * dictionary);
16 
17  CCDictionary * dictionaryFrom(const char * str);
18 
19 private:
20  void convertJsonToDictionary(cJSON *json, CCDictionary *dictionary);
21 
22  void convertDictionaryToJson(CCDictionary *dictionary, cJSON *json);
23 
24  void convertJsonToArray(cJSON * json, CCArray * array);
25 
26  void convertArrayToJson(CCArray * array, cJSON * json);
27 
28  cJSON * getObjJson(CCObject * obj);
29 
30  CCObject * getJsonObj(cJSON * json);
31 };
32 
33 #endif // #ifndef __CCJSONCONVERTER__H__
Definition: CCJSONConverter.h:10
Definition: cJSON.h:43