MCPcopy Create free account
hub / github.com/apache/httpd / fmt_to_flags

Function fmt_to_flags

modules/md/md_json.c:954–961  ·  view source on GitHub ↗

Convert from md_json_fmt_t to the Jansson json_dumpX flags. */

Source from the content-addressed store, hash-verified

952
953/* Convert from md_json_fmt_t to the Jansson json_dumpX flags. */
954static size_t fmt_to_flags(md_json_fmt_t fmt)
955{
956 /* NOTE: JSON_PRESERVE_ORDER is off by default before Jansson 2.8. It
957 * doesn't have any semantic effect on the protocol, but it does let the
958 * md_json_writeX unit tests run deterministically. */
959 return JSON_PRESERVE_ORDER |
960 ((fmt == MD_JSON_FMT_COMPACT) ? JSON_COMPACT : JSON_INDENT(2));
961}
962
963static int dump_cb(const char *buffer, size_t len, void *baton)
964{

Callers 2

md_json_writebFunction · 0.85
md_json_writepFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected