Lines Matching refs:json
6 /* This executable is used for testing parser/writer using real JSON files.
9 #include <json/json.h>
63 printValueTree(FILE* fout, Json::Value& value, const std::string& path = ".") {
64 if (value.hasComment(Json::commentBefore)) {
65 fprintf(fout, "%s\n", value.getComment(Json::commentBefore).c_str());
68 case Json::nullValue:
71 case Json::intValue:
75 Json::valueToString(value.asLargestInt()).c_str());
77 case Json::uintValue:
81 Json::valueToString(value.asLargestUInt()).c_str());
83 case Json::realValue:
89 case Json::stringValue:
92 case Json::booleanValue:
95 case Json::arrayValue: {
108 case Json::objectValue: {
110 Json::Value::Members members(value.getMemberNames());
113 for (Json::Value::Members::iterator it = members.begin();
124 if (value.hasComment(Json::commentAfter)) {
125 fprintf(fout, "%s\n", value.getComment(Json::commentAfter).c_str());
132 Json::Value& root,
133 const Json::Features& features,
135 Json::Reader reader(features);
157 const Json::Value& root,
159 // Json::FastWriter writer;
161 Json::StyledWriter writer;
193 printf("Usage: %s [--strict] input-json-file", argv[0]);
199 Json::Features& features,
208 if (std::string(argv[1]) == "--json-checker") {
209 features = Json::Features::strictMode();
214 if (std::string(argv[1]) == "--json-config") {
229 Json::Features features;
243 std::string basePath = removeSuffix(argv[1], ".json");
254 Json::Value root;
261 Json::Value rewriteRoot;