array_nl=

array_nl=(array_nl) Instance Public methods This string is put at the end of a line that holds a JSON array.

array_nl

array_nl() Instance Public methods This string is put at the end of a line that holds a JSON array.

allow_nan?

allow_nan? Instance Public methods Returns true, if NaN, Infinity, and -Infinity should be generated, otherwise returns false.

[]=

[]=(name, value) Instance Public methods Set the attribute name to value.

[]

[](name) Instance Public methods Return the value returned by method name.

new

new(opts = {}) Class Public methods Instantiates a new State object, configured by opts. opts can have the following keys: indent: a string used to indent levels (default: ''), space: a string that is put after, a : or , delimiter (default: ''), space_before: a string that is put before a : pair delimiter (default: ''), object_nl: a string that is put at the end of a JSON object (default: ''), array_nl: a string that is put at the end of a JSON array (default: ''), allo

from_state

from_state(opts) Class Public methods Creates a State object from opts, which ought to be Hash to create a new State instance configured by opts, something else to create an unconfigured instance. If opts is a State object, it is just returned.

to_json

to_json(*) Instance Public methods Returns a JSON string for true: 'true'.

to_json_raw_object

to_json_raw_object() Instance Public methods This method creates a raw object hash, that can be nested into other data structures and will be generated as a raw string. This method should be used, if you want to convert raw strings to JSON instead of UTF-8 strings, e. g. binary data.

to_json_raw

to_json_raw(*args) Instance Public methods This method creates a JSON text from the result of a call to #to_json_raw_object of this String.