Ion C
C library for Ion
_ion_writer_options Struct Reference

Data Fields

BOOL output_as_binary
 
BOOL escape_all_non_ascii
 
BOOL pretty_print
 
BOOL indent_with_tabs
 
SIZE indent_size
 
BOOL small_containers_in_line
 
BOOL supress_system_values
 
BOOL flush_every_value
 
SIZE max_container_depth
 
SIZE max_annotation_count
 
SIZE temp_buffer_size
 
SIZE allocation_page_size
 
ION_CATALOG * pcatalog
 
ION_COLLECTION encoding_psymbol_table
 
decContext * decimal_context
 
BOOL compact_floats
 
BOOL json_downconvert
 

Field Documentation

◆ allocation_page_size

SIZE _ion_writer_options::allocation_page_size

memory is allocated in pages owned by the primary entities it's default size is 4096

◆ compact_floats

BOOL _ion_writer_options::compact_floats

Normally floating point numbers (float or double) are written as 32-bit or 64-bit Ion floats depending on which Ion writer API is used. When enabled, this API allows the writer to represent a 64-bit float with only 32 bits whenever possible without losing precision.

◆ decimal_context

decContext* _ion_writer_options::decimal_context

Handle to the decNumber context for the writer to use. This allows configuration of the maximum number of decimal digits, decimal exponent range, etc. See decContextDefault in decContext.h for simple initialization.

If NULL, the writer will initialize its decimal context by calling decContextDefault with the DEC_INIT_DECQUAD option, which results in a maximum of 34 decimal digits and an exponent range of [-6143, 6144].

Note that up to 34 digits of precision will always be supported, even if configured to be less than 34.

◆ encoding_psymbol_table

ION_COLLECTION _ion_writer_options::encoding_psymbol_table

An ordered list of ION_SYMBOL_TABLE_IMPORT that the writer will import into each new local symbol table context. Should be initialized by calling ion_writer_options_initialize_shared_imports, populated by calling ion_writer_options_add_shared_imports and/or ion_writer_options_add_shared_imports_symbol_tables, and freed by calling ion_writer_options_close_shared_imports.

NOTE: the system symbol table is always used as the first import; it need not be provided here.

◆ escape_all_non_ascii

BOOL _ion_writer_options::escape_all_non_ascii

On text output, this escapes non-ascii characters. So the output file is pure ascii, only valid for text output

◆ flush_every_value

BOOL _ion_writer_options::flush_every_value

Turns on very active flushing of the internal streams (text only)

◆ indent_size

SIZE _ion_writer_options::indent_size

Sets indent amount for pretty printing. Defaults to 2. Ignored if indent_with_tabs is true.

◆ indent_with_tabs

BOOL _ion_writer_options::indent_with_tabs

Uses tabs for indenting instead of spaces

◆ json_downconvert

BOOL _ion_writer_options::json_downconvert

Enable JSON downconversion for the writer. This will cause the writer to produce valid JSON, losing any Ion specific features.

◆ max_annotation_count

SIZE _ion_writer_options::max_annotation_count

The max number of annotations on 1 value, defaults to 10

◆ max_container_depth

SIZE _ion_writer_options::max_container_depth

The max container depth defaults to 10

◆ pcatalog

ION_CATALOG* _ion_writer_options::pcatalog

Handle to catalog of shared symbol tables for the writer to use

◆ pretty_print

BOOL _ion_writer_options::pretty_print

Turns on pretty printing, only valid for text output

◆ small_containers_in_line

BOOL _ion_writer_options::small_containers_in_line

Puts "small" containers on a single line instead of putting all values on separate lines

◆ supress_system_values

BOOL _ion_writer_options::supress_system_values

Turns off the otherwise automatic insertion of system values (like symbol tables)

◆ temp_buffer_size

SIZE _ion_writer_options::temp_buffer_size

The temp buffer is used to hold temp strings (etc) default is 1024


The documentation for this struct was generated from the following file: