#ifndef GRPC_CORE_LIB_JSON_JSON_WRITER_H
#define GRPC_CORE_LIB_JSON_JSON_WRITER_H
#include <grpc/support/port_platform.h>
#include <stdlib.h>
#include "src/core/lib/json/json_common.h"
typedef struct grpc_json_writer_vtable {
void (*output_char)(void* userdata, char);
void (*output_string)(void* userdata, const char* str);
void (*output_string_with_len)(void* userdata, const char* str, size_t len);
} grpc_json_writer_vtable;
typedef struct grpc_json_writer {
void* userdata;
grpc_json_writer_vtable* vtable;
int indent;
int depth;
int container_empty;
int got_key;
} grpc_json_writer;
void grpc_json_writer_init(grpc_json_writer* writer, int indent,
grpc_json_writer_vtable* vtable, void* userdata);
void grpc_json_writer_container_begins(grpc_json_writer* writer,
grpc_json_type type);
void grpc_json_writer_container_ends(grpc_json_writer* writer,
grpc_json_type type);
void grpc_json_writer_object_key(grpc_json_writer* writer, const char* string);
void grpc_json_writer_value_raw(grpc_json_writer* writer, const char* string);
void grpc_json_writer_value_raw_with_len(grpc_json_writer* writer,
const char* string, size_t len);
void grpc_json_writer_value_string(grpc_json_writer* writer,
const char* string);
#endif