Class: JSON::Ext::ParserConfig
| Relationships & Source Files | |
| Inherits: | Object |
| Defined in: | ext/json/parser/parser.c |
Class Method Summary
-
.new(opts) ⇒ {}
constructor
private
Creates a new
ParserConfiginstance.
Instance Method Summary
-
#parse(source)
Parses the current
::JSONtext source and returns the complete data structure as a result.
Constructor Details
.new(opts) ⇒ {} (private)
Creates a new ParserConfig instance.
Argument opts, if given, contains a Hash of options for the parsing.
See Parsing Options.
# File 'ext/json/parser/parser.c', line 2056
static VALUE cParserConfig_initialize(VALUE self, VALUE opts)
{
rb_check_frozen(self);
GET_PARSER_CONFIG;
parser_config_init(config, opts, self, false);
return self;
}
Instance Method Details
#parse(source)
Parses the current ::JSON text source and returns the complete data
structure as a result.
It raises ::JSON::ParserError if fail to parse.
# File 'ext/json/parser/parser.c', line 2147
static VALUE cParserConfig_parse(VALUE self, VALUE Vsource)
{
GET_PARSER_CONFIG;
return cParser_parse(config, Vsource);
}