jx_print.h File Reference
Print JX expressions to strings, files, and buffers.
More...
#include "jx.h"
#include "buffer.h"
#include "link.h"
#include <stdio.h>
Go to the source code of this file.
Detailed Description
Print JX expressions to strings, files, and buffers.
Function Documentation
char* jx_print_string |
( |
struct jx * |
j |
) |
|
Convert a JX expression into a string.
- Parameters:
-
- Returns:
- A C string representing the expression in JSON form. The string must be deleted with free().
void jx_print_stream |
( |
struct jx * |
j, |
|
|
FILE * |
file | |
|
) |
| | |
Print a JX expression to a standard I/O stream.
- Parameters:
-
| j | A JX expression. |
| file | A standard IO stream. |
void jx_print_buffer |
( |
struct jx * |
j, |
|
|
buffer_t * |
buffer | |
|
) |
| | |
void jx_print_link |
( |
struct jx * |
j, |
|
|
struct link * |
l, |
|
|
time_t |
stoptime | |
|
) |
| | |
Print a JX expression to a link.
- Parameters:
-
| j | A JX expression. |
| l | The network link to write. |
- See also:
- link.h
void jx_escape_string |
( |
const char * |
s, |
|
|
buffer_t * |
b | |
|
) |
| | |
Print a C string in JSON format (with escape codes) into a buffer.
- Parameters:
-
- See also:
- buffer.h