Method: Yajl::Parser#on_parse_complete=
- Defined in:
- ext/yajl/yajl_ext.c
permalink #on_parse_complete=(callback) ⇒ Object
call-seq: on_parse_complete = Proc.new { |obj| … }
This callback setter allows you to pass a Proc/lambda or any other object that responds to #call.
It will pass a single parameter, the ruby object built from the last parsed JSON object
623 624 625 626 627 628 |
# File 'ext/yajl/yajl_ext.c', line 623
static VALUE rb_yajl_parser_set_complete_cb(VALUE self, VALUE callback) {
yajl_parser_wrapper * wrapper;
GetParser(self, wrapper);
wrapper->parse_complete_callback = callback;
return Qnil;
}
|