Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F5365555
json.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
json.h
View Options
#ifndef ANT_INSPECTOR_JSON_H
#define ANT_INSPECTOR_JSON_H
#include
"bind.h"
typedef
enum
{
INSPECTOR_JSON_OBJECT
,
INSPECTOR_JSON_ARRAY
}
inspector_json_container_t
;
typedef
struct
{
inspector_json_container_t
type
;
bool
needs_comma
;
bool
expecting_value
;
}
inspector_json_frame_t
;
typedef
struct
{
sbuf_t
*
out
;
inspector_json_frame_t
stack
[
32
];
size_t
depth
;
bool
wrote_root
;
}
inspector_json_t
;
void
inspector_json_init
(
inspector_json_t
*
json
,
sbuf_t
*
out
);
bool
inspector_json_begin_object
(
inspector_json_t
*
json
);
bool
inspector_json_end_object
(
inspector_json_t
*
json
);
bool
inspector_json_begin_array
(
inspector_json_t
*
json
);
bool
inspector_json_end_array
(
inspector_json_t
*
json
);
bool
inspector_json_key
(
inspector_json_t
*
json
,
const
char
*
key
);
bool
inspector_json_raw
(
inspector_json_t
*
json
,
const
char
*
raw
);
bool
inspector_json_string
(
inspector_json_t
*
json
,
const
char
*
value
);
bool
inspector_json_string_len
(
inspector_json_t
*
json
,
const
char
*
value
,
size_t
len
);
bool
inspector_json_bool
(
inspector_json_t
*
json
,
bool
value
);
bool
inspector_json_int
(
inspector_json_t
*
json
,
int
value
);
bool
inspector_json_uint64
(
inspector_json_t
*
json
,
uint64_t
value
);
bool
inspector_json_size
(
inspector_json_t
*
json
,
size_t
value
);
bool
inspector_json_double
(
inspector_json_t
*
json
,
double
value
);
bool
inspector_json_null
(
inspector_json_t
*
json
);
#endif
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sun, May 17, 5:46 AM (1 d, 22 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
554529
Default Alt Text
json.h (1 KB)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment