cctools
jx_print.h
Go to the documentation of this file.
1/*
2Copyright (C) 2022 The University of Notre Dame
3This software is distributed under the GNU General Public License.
4See 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
19char * jx_print_string( struct jx *j );
20
23void jx_print_stream( struct jx *j, FILE *file );
24
27void jx_print_shell( struct jx *j, FILE *file );
28
31void jx_print_buffer( struct jx *j, buffer_t *buffer);
32
35void jx_print_link( struct jx *j, struct link *l, time_t stoptime );
36
38void jx_escape_string( const char *s, buffer_t *b );
39
41void jx_print_args( struct jx *j, buffer_t *b );
42
44const char * jx_operator_string( jx_operator_t type );
45
47const char * jx_type_string( jx_type_t type );
48
49// internal function for printing list comprehension expressions
50void jx_comprehension_print(struct jx_comprehension *comp, buffer_t *b);
51
52
53#endif
String Buffer Operations.
JSON Expressions (JX) library.
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_type_string(jx_type_t type)
Get a string representation of an object type.
void jx_print_link(struct jx *j, struct link *l, time_t stoptime)
Print a JX expression to a link.
const char * jx_operator_string(jx_operator_t type)
Get a string representation of an operator.
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.
void jx_print_buffer(struct jx *j, buffer_t *buffer)
Print a JX expression to a buffer.
void jx_print_shell(struct jx *j, FILE *file)
Print a JX object as shell environment variables.
void jx_print_args(struct jx *j, buffer_t *b)
Print a list of arguments to a buffer.
Definition buffer.h:26
Definition jx.h:59
JX value representing any expression type.
Definition jx.h:117