diff options
| author | Philipp Stephani | 2017-12-19 00:03:05 +0100 |
|---|---|---|
| committer | Philipp Stephani | 2017-12-19 00:11:40 +0100 |
| commit | 87bd1d914e856346c7d22bd080155362ce5ac02f (patch) | |
| tree | e36935e6872278cb0d5a84eb63ed32c1bc69fe63 /src/json.c | |
| parent | 994ce51b28384bb2ea7a88248a105fcdc7c53a7b (diff) | |
| download | emacs-87bd1d914e856346c7d22bd080155362ce5ac02f.tar.gz emacs-87bd1d914e856346c7d22bd080155362ce5ac02f.zip | |
; Add comments about potential future Jansson flags
* src/json.c (Fjson_serialize, Fjson_insert): Add comments about
flags that we might potentially add in the future.
Diffstat (limited to 'src/json.c')
| -rw-r--r-- | src/json.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/json.c b/src/json.c index 72ca93f621b..5849705952d 100644 --- a/src/json.c +++ b/src/json.c | |||
| @@ -415,6 +415,8 @@ each object. */) | |||
| 415 | json_t *json = lisp_to_json_toplevel (object); | 415 | json_t *json = lisp_to_json_toplevel (object); |
| 416 | record_unwind_protect_ptr (json_release_object, json); | 416 | record_unwind_protect_ptr (json_release_object, json); |
| 417 | 417 | ||
| 418 | /* If desired, we might want to add the following flags: | ||
| 419 | JSON_DECODE_ANY, JSON_ALLOW_NUL. */ | ||
| 418 | char *string = json_dumps (json, JSON_COMPACT); | 420 | char *string = json_dumps (json, JSON_COMPACT); |
| 419 | if (string == NULL) | 421 | if (string == NULL) |
| 420 | json_out_of_memory (); | 422 | json_out_of_memory (); |
| @@ -494,6 +496,8 @@ OBJECT. */) | |||
| 494 | record_unwind_protect_ptr (json_release_object, json); | 496 | record_unwind_protect_ptr (json_release_object, json); |
| 495 | 497 | ||
| 496 | struct json_insert_data data; | 498 | struct json_insert_data data; |
| 499 | /* If desired, we might want to add the following flags: | ||
| 500 | JSON_DECODE_ANY, JSON_ALLOW_NUL. */ | ||
| 497 | int status | 501 | int status |
| 498 | = json_dump_callback (json, json_insert_callback, &data, JSON_COMPACT); | 502 | = json_dump_callback (json, json_insert_callback, &data, JSON_COMPACT); |
| 499 | if (status == -1) | 503 | if (status == -1) |