-
Notifications
You must be signed in to change notification settings - Fork 5
/
json.h
19 lines (14 loc) · 898 Bytes
/
json.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef H2OLOG_JSON_UTILS_H
#define H2OLOG_JSON_UTILS_H
#include <cstdio>
#include <cstdint>
// "_n" suffix means "with no heading comma"
// "_c" suffix means "with a heading comma"
void json_write_pair_n(std::FILE *out, const char *name, size_t name_len, const char *value);
void json_write_pair_c(std::FILE *out, const char *name, size_t name_len, const char *value);
void json_write_pair_c(std::FILE *out, const char *name, size_t name_len, const void *value, std::size_t len);
void json_write_pair_c(std::FILE *out, const char *name, size_t name_len, const std::int64_t value);
void json_write_pair_c(std::FILE *out, const char *name, size_t name_len, const std::uint64_t value);
void json_write_pair_c(std::FILE *out, const char *name, size_t name_len, const std::int32_t value);
void json_write_pair_c(std::FILE *out, const char *name, size_t name_len, const std::uint32_t value);
#endif