ext/iodine/iodine_json.c
/** a dictionary object was detected, should return 0 unless error occurred. */
a dictionary object was detected, should return 0 unless error occurred.
a dictionary object was detected should return 0 unless error occurred .
static int fio_json_on_start_object(json_parser_s *p) {
  iodine_json_parser_s *pr = (iodine_json_parser_s *)p;
  if (pr->target) {
    fio_json_stack_push(&pr->stack, pr->top);
    pr->top = pr->target;
    pr->target = 0;
  } else {
    VALUE h = rb_hash_new();
    iodine_json_add2parser(pr, h);
    fio_json_stack_push(&pr->stack, pr->top);
    pr->top = h;
  }
  pr->is_hash = 1;
  return 0;
}
static int fio_json_on_start_object ( json_parser_s * p ) { iodine_json_parser_s * pr = ( iodine_json_parser_s * ) p ; if ( pr -> target ) { fio_json_stack_push ( & pr -> stack , pr -> top ) ; pr -> top = pr -> target ; pr -> target = 0 ; } else { VALUE h = rb_hash_new ( ) ; iodine_json_add2parser ( pr , h ) ; fio_json_stack_push ( & pr -> stack , pr -> top ) ; pr -> top = h ; } pr -> is_hash = 1 ; return 0 ; }
a dictionary object was detected, should return 0 unless error occurred.
a dictionary object was detected should return 0 unless error occurred .
/* push NULL, don't free the objects */