}
-int json_dump(const json_t *json, const char *path, uint32_t flags)
-{
- int result;
-
- FILE *output = fopen(path, "w");
- if(!output)
- return -1;
-
- result = json_dumpf(json, output, flags);
-
- fclose(output);
- return result;
-}
-
char *json_dumps(const json_t *json, uint32_t flags)
{
strbuffer_t strbuff;
return -1;
return dump_to_file("\n", 1, (void *)output);
}
+
+int json_dump_file(const json_t *json, const char *path, uint32_t flags)
+{
+ int result;
+
+ FILE *output = fopen(path, "w");
+ if(!output)
+ return -1;
+
+ result = json_dumpf(json, output, flags);
+
+ fclose(output);
+ return result;
+}