Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
JSON::ResumableParser#partial_value
partial_value → object
ext/json/parser/parser.c
View on GitHub ↗
static VALUE cResumableParser_partial_value(VALUE self)
{
JSON_ResumableParser *parser = ResumableParser_acquire(self, true);
int status;
VALUE result = rb_protect(cResumableParser_partial_value_body, self, &status);
parser->in_use = false;
if (status) {
rb_jump_tag(status);
}
return result;
}
Returns the Ruby objects parsed up to this point:
Example
parser << '[1, [2, 3,' parser.parse # => false parser.value # ArgumentError no ready value parser.partial_value # => [1, [2, 3]]