FreeWRL/FreeX3D  3.0.0
cson_output_opt Struct Reference

Client-configurable options for the cson_output() family of functions. More...

#include <cson_amalgamation_core.h>

Data Fields

unsigned char indentation
 Specifies how to indent (or not) output. More...
 
unsigned short maxDepth
 Maximum object/array depth to traverse. More...
 
char addNewline
 If true, a newline will be added to generated output, else not.
 
char addSpaceAfterColon
 If true, a space will be added after the colon operator in objects' key/value pairs.
 
char indentSingleMemberValues
 If set to 1 then objects/arrays containing only a single value will not indent an extra level for that value (but will indent on subsequent levels if that value contains multiple values).
 
char escapeForwardSlashes
 The JSON format allows, but does not require, JSON generators to backslash-escape forward slashes. More...
 

Detailed Description

Client-configurable options for the cson_output() family of functions.

Definition at line 517 of file cson_amalgamation_core.h.

Field Documentation

char cson_output_opt::escapeForwardSlashes

The JSON format allows, but does not require, JSON generators to backslash-escape forward slashes.

This option enables/disables that feature. According to JSON's inventor, Douglas Crockford:

<quote> It is allowed, not required. It is allowed so that JSON can be safely embedded in HTML, which can freak out when seeing strings containing "</". JSON tolerates "<\/" for this reason. </quote>

(from an email on 2011-04-08)

The default value is 0 (because it's just damned ugly).

Definition at line 572 of file cson_amalgamation_core.h.

unsigned char cson_output_opt::indentation

Specifies how to indent (or not) output.

The values are:

(0) == no extra indentation.

(1) == 1 TAB character for each level.

(>1) == that number of SPACES for each level.

Definition at line 529 of file cson_amalgamation_core.h.

unsigned short cson_output_opt::maxDepth

Maximum object/array depth to traverse.

Traversing deeply can be indicative of cycles in the object/array tree, and this value is used to figure out when to abort the traversal.

Definition at line 536 of file cson_amalgamation_core.h.


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