Class | JSON::Ext::Generator::State |
In: |
ext/json/ext/generator/generator.c
|
Parent: | Object |
Instantiates a new State object, configured by opts.
opts can have the following keys:
Instantiates a new State object, configured by opts.
opts can have the following keys:
This sets the initial length of the buffer to length, if length > 0, otherwise its value isn‘t changed.
This sets the initial length of the buffer to length, if length > 0, otherwise its value isn‘t changed.
This sets the maximum level of data structure nesting in the generated JSON to the integer depth, max_nesting = 0 if no maximum should be checked.
This sets the maximum level of data structure nesting in the generated JSON to the integer depth, max_nesting = 0 if no maximum should be checked.
Generates a valid JSON document from object obj and returns the result. If no valid JSON document can be created this method raises a GeneratorError exception.
Generates a valid JSON document from object obj and returns the result. If no valid JSON document can be created this method raises a GeneratorError exception.
This integer returns the maximum level of data structure nesting in the generated JSON, max_nesting = 0 if no maximum is checked.
This integer returns the maximum level of data structure nesting in the generated JSON, max_nesting = 0 if no maximum is checked.
This sets the maximum level of data structure nesting in the generated JSON to the integer depth, max_nesting = 0 if no maximum should be checked.
This sets the maximum level of data structure nesting in the generated JSON to the integer depth, max_nesting = 0 if no maximum should be checked.
Returns the configuration instance variables as a hash, that can be passed to the configure method.