class JSON::TruffleRuby::Generator::State
def initialize(opts = nil)
generated, otherwise an exception is thrown, if these values are
* *allow_nan*: true if NaN, Infinity, and -Infinity should be
the generated JSON, max_nesting = 0 if no maximum should be checked.
* *max_nesting*: sets the maximum level of data structure nesting in
* *check_circular*: is deprecated now, use the :max_nesting option instead,
as to make the JSON object safe to interpolate in a script tag (default: false).
* *script_safe*: true if U+2028, U+2029 and forward slash (/) should be escaped
* *array_nl*: a string that is put at the end of a JSON array (default: ''),
* *object_nl*: a string that is put at the end of a JSON object (default: ''),
* *space_before*: a string that is put before a : pair delimiter (default: ''),
* *space*: a string that is put after, a : or , delimiter (default: ''),
* *indent*: a string used to indent levels (default: ''),
_opts_ can have the following keys:
Instantiates a new State object, configured by _opts_.
def initialize(opts = nil) @indent = '' @space = '' @space_before = '' @object_nl = '' @array_nl = '' @allow_nan = false @ascii_only = false @depth = 0 @buffer_initial_length = 1024 @script_safe = false @strict = false @max_nesting = 100 configure(opts) if opts end