diff options
author | Valentin Bartenev <vbart@nginx.com> | 2017-05-16 22:02:01 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2017-05-16 22:02:01 +0300 |
commit | dc95b2f3de76df03b64bab9bbc5e6a9dc7015550 (patch) | |
tree | 7c038aaa3ae2705e0544d94b73b2d7bbf58245ac /src/nxt_conf.h | |
parent | 0ca2c2fce2c21a397fc10d19bca6628df7bc62ab (diff) | |
download | unit-dc95b2f3de76df03b64bab9bbc5e6a9dc7015550.tar.gz unit-dc95b2f3de76df03b64bab9bbc5e6a9dc7015550.tar.bz2 |
Controller: pretty-printing of JSON responses.
Diffstat (limited to 'src/nxt_conf.h')
-rw-r--r-- | src/nxt_conf.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/nxt_conf.h b/src/nxt_conf.h index 5dd16177..4d427bce 100644 --- a/src/nxt_conf.h +++ b/src/nxt_conf.h @@ -12,10 +12,16 @@ typedef struct nxt_conf_json_value_s nxt_conf_json_value_t; +typedef struct { + nxt_uint_t level; + nxt_bool_t more_space; /* 1 bit. */ +} nxt_conf_json_pretty_t; + + nxt_conf_json_value_t *nxt_conf_json_parse(u_char *pos, size_t length, nxt_mem_pool_t *pool); -nxt_buf_t *nxt_conf_json_print(nxt_conf_json_value_t *value, - nxt_mem_pool_t *pool); +uintptr_t nxt_conf_json_print_value(u_char *pos, nxt_conf_json_value_t *value, + nxt_conf_json_pretty_t *pretty); #endif /* _NXT_CONF_INCLUDED_ */ |