Export app json files indented with tabs.
This commit is contained in:
parent
2701b7d04e
commit
63ae186c76
@ -171,7 +171,9 @@ void tf_ssb_export(tf_ssb_t* ssb, const char* key)
|
|||||||
JS_DeleteProperty(context, app, files_atom, 0);
|
JS_DeleteProperty(context, app, files_atom, 0);
|
||||||
JS_FreeAtom(context, files_atom);
|
JS_FreeAtom(context, files_atom);
|
||||||
|
|
||||||
JSValue json = JS_JSONStringify(context, app, JS_NULL, JS_NewInt32(context, 2));
|
JSValue tab = JS_NewString(context, "\t");
|
||||||
|
JSValue json = JS_JSONStringify(context, app, JS_NULL, tab);
|
||||||
|
JS_FreeValue(context, tab);
|
||||||
size_t length = 0;
|
size_t length = 0;
|
||||||
const char* string = JS_ToCStringLen(context, &length, json);
|
const char* string = JS_ToCStringLen(context, &length, json);
|
||||||
snprintf(file_path, sizeof(file_path), "apps/%s.json", path);
|
snprintf(file_path, sizeof(file_path), "apps/%s.json", path);
|
||||||
|
Loading…
Reference in New Issue
Block a user