13#ifndef __JSON_DUMPER_H__
14#define __JSON_DUMPER_H__
16#include "ws_symbol_export.h"
56#define JSON_DUMPER_MAX_DEPTH 1100
60#define JSON_DUMPER_FLAGS_PRETTY_PRINT (1 << 0)
61#define JSON_DUMPER_DOT_TO_UNDERSCORE (1 << 1)
62#define JSON_DUMPER_FLAGS_NO_DEBUG (1 << 17)
65 unsigned current_depth;
WS_DLL_PUBLIC void json_dumper_value_double(json_dumper *dumper, double value)
Writes a double-precision numeric value to the JSON output.
Definition json_dumper.c:588
WS_DLL_PUBLIC void json_dumper_set_member_name(json_dumper *dumper, const char *name)
Sets the name of the next member in a JSON object.
Definition json_dumper.c:438
WS_DLL_PUBLIC void json_dumper_begin_base64(json_dumper *dumper)
Begins a base64-encoded data block.
Definition json_dumper.c:654
WS_DLL_PUBLIC void WS_DLL_PUBLIC void json_dumper_value_va_list(json_dumper *dumper, const char *format, va_list ap)
Writes a formatted literal value using a va_list.
Definition json_dumper.c:610
#define JSON_DUMPER_MAX_DEPTH
Definition json_dumper.h:56
WS_DLL_PUBLIC void json_dumper_end_object(json_dumper *dumper)
Ends the current JSON object.
Definition json_dumper.c:468
WS_DLL_PUBLIC bool json_dumper_finish(json_dumper *dumper)
Finalizes the JSON output.
Definition json_dumper.c:637
WS_DLL_PUBLIC void json_dumper_value_anyf(json_dumper *dumper, const char *format,...) G_GNUC_PRINTF(2
Writes a formatted literal value to the JSON output.
WS_DLL_PUBLIC void json_dumper_end_array(json_dumper *dumper)
Ends the current JSON array.
Definition json_dumper.c:480
WS_DLL_PUBLIC void json_dumper_end_base64(json_dumper *dumper)
Ends a base64-encoded data block.
Definition json_dumper.c:688
WS_DLL_PUBLIC void json_dumper_begin_object(json_dumper *dumper)
Begins a new JSON object.
Definition json_dumper.c:432
WS_DLL_PUBLIC void json_dumper_value_string(json_dumper *dumper, const char *value)
Writes a string value to the JSON output.
Definition json_dumper.c:572
WS_DLL_PUBLIC void json_dumper_begin_array(json_dumper *dumper)
Begins a new JSON array.
Definition json_dumper.c:474
WS_DLL_PUBLIC void json_dumper_write_base64(json_dumper *dumper, const unsigned char *data, size_t len)
Writes binary data in base64 format.
Definition json_dumper.c:660
Definition json_dumper.h:57
FILE * output_file
Definition json_dumper.h:58
GString * output_string
Definition json_dumper.h:59