diff --git a/test/json_test.cpp b/test/json_test.cpp new file mode 100644 index 000000000..1c1bb97b3 --- /dev/null +++ b/test/json_test.cpp @@ -0,0 +1,87 @@ +/* + * ===================================================================================== + * + * Filename: json_test.cpp + * + * Description: + * + * Version: 1.0 + * Created: 2017/02/15 16时44分43秒 + * Revision: none + * Compiler: gcc + * + * Author: Chen Xi (happyleaf), happyleaf.cx + * Organization: + * + * ===================================================================================== + */ + + +#include +#include +#include +/* + * === FUNCTION ====================================================================== + * Name: main + * Description: + * ===================================================================================== + */ +#include +#include +#include +#include +using namespace std; + +int main(int argc, char *argv[]) { + char *json = " \ +{ \n\ + \"encoding\" : \"UTF-8\", \n\ + \n\ + \"plug-ins\" : [ \n\ + \"python\", \n\ + \"c++\", \n\ + \"ruby\" \n\ + ], \n\ + \n\ + \"indent\" : { \"length\" : 3, \"use_space\": true } \n\ +}\n"; + Json::Value root(json); + cout<