grblHAL core  20261015
stream_json.h File Reference
#include <stdlib.h>
#include <stdbool.h>
#include "real.h"

Go to the source code of this file.

Typedefs

typedef struct json_out json_out_t
 
typedef bool(* json_callback_ptr) (char *tag, char *value, bool is_string, void *data)
 

Functions

json_out_t * json_start (vfs_file_t *file, uint32_t max_levels)
 
bool json_end (json_out_t *json)
 
bool json_start_object (json_out_t *json)
 
bool json_start_tagged_object (json_out_t *json, const char *tag)
 
bool json_end_object (json_out_t *json)
 
bool json_start_array (json_out_t *json, const char *tag)
 
bool json_end_array (json_out_t *json)
 
bool json_add_string (json_out_t *json, const char *tag, const char *s)
 
bool json_add_int (json_out_t *json, const char *tag, int32_t value)
 
bool json_add_real (json_out_t *json, const char *tag, real_t value, uint8_t decimal_places)
 
bool json_parse_string (char *json, json_callback_ptr callback, void *data)
 

Typedef Documentation

◆ json_callback_ptr

typedef bool(* json_callback_ptr) (char *tag, char *value, bool is_string, void *data)

◆ json_out_t

typedef struct json_out json_out_t

Function Documentation

◆ json_add_int()

bool json_add_int ( json_out_t *  json,
const char *  tag,
int32_t  value 
)

◆ json_add_real()

bool json_add_real ( json_out_t *  json,
const char *  tag,
real_t  value,
uint8_t  decimal_places 
)

◆ json_add_string()

bool json_add_string ( json_out_t *  json,
const char *  tag,
const char *  s 
)

◆ json_end()

bool json_end ( json_out_t *  json)

◆ json_end_array()

bool json_end_array ( json_out_t *  json)

◆ json_end_object()

bool json_end_object ( json_out_t *  json)

◆ json_parse_string()

bool json_parse_string ( char *  json,
json_callback_ptr  callback,
void *  data 
)

◆ json_start()

json_out_t* json_start ( vfs_file_t *  file,
uint32_t  max_levels 
)

◆ json_start_array()

bool json_start_array ( json_out_t *  json,
const char *  tag 
)

◆ json_start_object()

bool json_start_object ( json_out_t *  json)

◆ json_start_tagged_object()

bool json_start_tagged_object ( json_out_t *  json,
const char *  tag 
)