fprintf(stderr, "-d Enable more debugging information.\n");
fprintf(stderr, "-u socket Specify the Unix-domain socket used for communication with lldpd(8).\n");
- fprintf(stderr, "-f format Choose output format (plain, keyvalue"
+ fprintf(stderr, "-f format Choose output format (plain, keyvalue, json, json0"
#if defined USE_XML
", xml"
-#endif
-#if defined USE_JANSSON || defined USE_JSONC
- ", json"
#endif
").\n");
if (!is_lldpctl(NULL))
if (strcmp(fmt, "plain") == 0) w = txt_init(stdout);
else if (strcmp(fmt, "keyvalue") == 0) w = kv_init(stdout);
+ else if (strcmp(fmt, "json") == 0) w = json_init(stdout, 1);
+ else if (strcmp(fmt, "json0") == 0) w = json_init(stdout, 0);
#ifdef USE_XML
else if (strcmp(fmt, "xml") == 0) w = xml_init(stdout);
-#endif
-#ifdef USE_JANSSON
- else if (strcmp(fmt, "json") == 0) w = jansson_init(stdout);
-#endif
-#ifdef USE_JSONC
- else if (strcmp(fmt, "json") == 0) w = jsonc_init(stdout);
#endif
else {
log_warnx("lldpctl", "unknown output format \"%s\"", fmt);