yumapro  20.10-12
YumaPro SDK
json_wr.h File Reference

JSON Write functions. More...

#include <stdio.h>
#include <xmlstring.h>
#include "ses.h"
#include "status.h"
#include "val.h"
#include "val_util.h"
#include "getcb.h"
Include dependency graph for json_wr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  json_walker_cookie_t_
 JSON walker function for GET2 support. More...
 

Enumerations

enum  json_wr_tag_t_
 type parser used in 3 separate modes
 

Functions

void json_wr_start_object (ses_cb_t *scb, xml_msg_hdr_t *msg, const xmlChar *modname, const xmlChar *name, int32 startindent)
 generate start of a JSON object More...
 
void json_wr_start_object_ex (ses_cb_t *scb, xml_msg_hdr_t *msg, const xmlChar *modname, const xmlChar *name, int32 startindent, boolean startbrace, boolean endbrace)
 generate start of a JSON object (extended version) More...
 
void json_wr_start_object_val (ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, int32 startindent)
 generate start of a JSON object based on val value tree More...
 
void json_wr_start_object_obj (ses_cb_t *scb, xml_msg_hdr_t *msg, const xmlChar *modname, const xmlChar *name, obj_template_t *obj, int32 startindent)
 generate start of a JSON object based on val value tree; use OBJ to check the modname More...
 
void json_wr_end_object (ses_cb_t *scb, xml_msg_hdr_t *msg, int32 startindent)
 generate end of a JSON object More...
 
void json_wr_start_array (ses_cb_t *scb, xml_msg_hdr_t *msg, int32 startindent)
 generate start of a JSON array More...
 
void json_wr_start_array_obj (ses_cb_t *scb, xml_msg_hdr_t *msg, const xmlChar *modname, const xmlChar *name, obj_template_t *obj, int32 startindent, boolean startbrace, boolean startbracket)
 generate start of a JSON array; use OBJ to check the modname More...
 
void json_wr_start_array_val (ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, int32 startindent, boolean startbrace, boolean startbracket)
 generate start of a JSON array; use value node More...
 
void json_wr_end_array (ses_cb_t *scb, xml_msg_hdr_t *msg, int32 startindent)
 generate end of a JSON array More...
 
void json_wr_simval_line (ses_cb_t *scb, xml_msg_hdr_t *msg, xmlns_id_t nsid, const xmlChar *namestr, const xmlChar *valstr, ncx_btype_t btyp, int32 startindent, boolean isfirst)
 generate 1 line for a simple value within a container or array More...
 
status_t json_wr_max_check_val (ses_cb_t *scb, xml_msg_hdr_t *msg, xmlns_id_t parent_nsid, val_value_t *val, int32 startindent, val_nodetest_fn_t testfn, boolean isfirst, boolean islast, boolean isfirstchild, boolean isfirstsibling, boolean force_lastsibling, boolean force_lastsib_value, boolean force_array_obj)
 generate entire val_value_t *w/filter) More...
 
status_t json_wr_max_check_val_force (ses_cb_t *scb, xml_msg_hdr_t *msg, xmlns_id_t parent_nsid, val_value_t *val, int32 startindent, val_nodetest_fn_t testfn, boolean isfirst, boolean islast, boolean isfirstchild, boolean isfirstsibling, boolean force_lastsibling, boolean force_lastsib_value, boolean force_array_obj, xmlns_id_t force_nsid, const xmlChar *force_name)
 generate entire val_value_t *w/filter) More...
 
status_t json_wr_full_check_val (ses_cb_t *scb, xml_msg_hdr_t *msg, xmlns_id_t parent_nsid, val_value_t *val, int32 startindent, val_nodetest_fn_t testfn)
 generate entire val_value_t *w/filter) More...
 
status_t json_wr_full_check_val_force (ses_cb_t *scb, xml_msg_hdr_t *msg, xmlns_id_t parent_nsid, val_value_t *val, int32 startindent, val_nodetest_fn_t testfn, xmlns_id_t force_nsid, const xmlChar *force_name)
 generate entire val_value_t *w/filter) More...
 
status_t json_wr_check_open_file (FILE *fp, val_value_t *val, int32 startindent, int32 indent, val_nodetest_fn_t testfn)
 Write the specified value to an open FILE in JSON format. More...
 
status_t json_wr_check_file (const xmlChar *filespec, val_value_t *val, int32 startindent, int32 indent, val_nodetest_fn_t testfn)
 Write the specified value to a FILE in JSON format. More...
 
status_t json_wr_file (const xmlChar *filespec, val_value_t *val, int32 startindent, int32 indent)
 Write the specified value to a FILE in JSON format. More...
 
void json_wr_output_null (ses_cb_t *scb, int32 startindent)
 generate a null value; needed for printing empty <data> element which is done as a wrapper, not a real value node More...
 
void json_wr_check_child_obj (ses_cb_t *scb, xml_msg_hdr_t *msg, val_value_t *val, obj_template_t *objnode, int32 indent, val_nodetest_fn_t testfn, boolean isfirst, boolean isfirstchild)
 generate entire val_value_t *w/filter) More...
 
void json_wr_check_child_obj_ex (ses_cb_t *scb, xml_msg_hdr_t *msg, getcb_get2_t *parent_get2cb, obj_template_t *objnode, int32 indent, val_nodetest_fn_t testfn, boolean isfirst, boolean isfirstchild)
 generate entire val_value_t *w/filter) (extended version) More...
 

Detailed Description

JSON Write functions.