cctools
jx_print.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2015- The University of Notre Dame
3 This software is distributed under the GNU General Public License.
4 See the file COPYING for details.
5 */
6 
7 #ifndef JX_PRINT_H
8 #define JX_PRINT_H
9 
12 #include "jx.h"
13 #include "buffer.h"
14 #include "link.h"
15 #include <stdio.h>
16 
19 char * jx_print_string( struct jx *j );
20 
23 void jx_print_stream( struct jx *j, FILE *file );
24 
27 void jx_print_buffer( struct jx *j, buffer_t *buffer);
28 
31 void jx_print_link( struct jx *j, struct link *l, time_t stoptime );
32 
34 void jx_escape_string( const char *s, buffer_t *b );
35 
37 void jx_print_args( struct jx *j, buffer_t *b );
38 
40 const char * jx_operator_string( jx_operator_t type );
41 
43 const char * jx_type_string( jx_type_t type );
44 
45 // internal function for printing list comprehension expressions
46 void jx_comprehension_print(struct jx_comprehension *comp, buffer_t *b);
47 #endif
void jx_print_buffer(struct jx *j, buffer_t *buffer)
Print a JX expression to a buffer.
const char * jx_type_string(jx_type_t type)
Get a string representation of an object type.
void jx_print_args(struct jx *j, buffer_t *b)
Print a list of arguments to a buffer.
void jx_escape_string(const char *s, buffer_t *b)
Print a C string in JSON format (with escape codes) into a buffer.
char * jx_print_string(struct jx *j)
Convert a JX expression into a string.
JSON Expressions (JX) library.
Definition: jx.h:59
String Buffer Operations.
Definition: buffer.h:26
JX value representing any expression type.
Definition: jx.h:117
jx_type_t type
type of this value
Definition: jx.h:118
void jx_print_link(struct jx *j, struct link *l, time_t stoptime)
Print a JX expression to a link.
jx_type_t
JX atomic type.
Definition: jx.h:43
void jx_print_stream(struct jx *j, FILE *file)
Print a JX expression to a standard I/O stream.
const char * jx_operator_string(jx_operator_t type)
Get a string representation of an operator.