codex
Loading...
Searching...
No Matches
json.c File Reference
#include "yaml.h"
#include <assert.h>
#include <stdint.h>
#include <cjson/cJSON.h>
Include dependency graph for json.c:

Classes

struct  stack_item
 
struct  stack
 

Enumerations

enum  stage { ROOT , SEQ , MAP_KEY , MAP_VALUE }
 

Functions

static void stack_init (struct stack *s, FILE *out)
 
static void stack_destroy (struct stack *s, bool ok)
 
static void stack_push (struct stack *s, enum stage stage, cJSON *obj)
 
static void stack_pop (struct stack *s)
 
static void stack_set_key (struct stack_item *p, const struct scalar_string *s)
 
static cJSON * scalar_to_json (const struct scalar *s)
 
static void dump_json (cJSON *j, FILE *out)
 
static void document_end (struct stack *s)
 
static bool sequence_start (struct stack *s)
 
static bool mapping_start (struct stack *s)
 
static void obj_end (struct stack *s)
 
static bool scalar (struct stack *s, yaml_event_t *event)
 
static int process_event (struct stack *s, yaml_event_t *event)
 
static void print_problem (const yaml_parser_t *p)
 
int process_json (struct parser *parser, FILE *out)
 

Enumeration Type Documentation

◆ stage

enum stage
Enumerator
ROOT 
SEQ 
MAP_KEY 
MAP_VALUE 

Function Documentation

◆ document_end()

static void document_end ( struct stack * s)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ dump_json()

static void dump_json ( cJSON * j,
FILE * out )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mapping_start()

static bool mapping_start ( struct stack * s)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ obj_end()

static void obj_end ( struct stack * s)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_problem()

static void print_problem ( const yaml_parser_t * p)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_event()

static int process_event ( struct stack * s,
yaml_event_t * event )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ process_json()

int process_json ( struct parser * parser,
FILE * out )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ scalar()

static bool scalar ( struct stack * s,
yaml_event_t * event )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ scalar_to_json()

static cJSON * scalar_to_json ( const struct scalar * s)
static
Here is the caller graph for this function:

◆ sequence_start()

static bool sequence_start ( struct stack * s)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stack_destroy()

static void stack_destroy ( struct stack * s,
bool ok )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stack_init()

static void stack_init ( struct stack * s,
FILE * out )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stack_pop()

static void stack_pop ( struct stack * s)
static
Here is the caller graph for this function:

◆ stack_push()

static void stack_push ( struct stack * s,
enum stage stage ,
cJSON * obj )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stack_set_key()

static void stack_set_key ( struct stack_item * p,
const struct scalar_string * s )
static
Here is the caller graph for this function: