ext/iodine/iodine_json.c
/**
Parse a JSON string using the iodine lenient parser (it's also faster).
*/
Parse a JSON string using the iodine lenient parser (it's also faster).
Parse a JSON string using the iodine lenient parser ( it ' s also faster ) .
static VALUE iodine_json_parse(int argc, VALUE *argv, VALUE self) {
  fiobj2rb_settings_s s = {.str2sym = 0};
  if (argc > 2)
    rb_raise(rb_eTypeError, "function requires supports up to two arguments.");
  if (argc == 2) {
    Check_Type(argv[1], T_HASH);
    iodine_json_update_settings(argv[1], &s);
  }
  if (argc >= 1)
    Check_Type(argv[0], T_STRING);
  else
    rb_raise(rb_eTypeError, "function requires at least one argument.");
  return iodine_json_convert(argv[0], s);
  (void)self;
}
static VALUE iodine_json_parse ( int argc , VALUE * argv , VALUE self ) { fiobj2rb_settings_s s = { . str2sym = 0 } ; if ( argc > 2 ) rb_raise ( rb_eTypeError , " " ) ; if ( argc == 2 ) { Check_Type ( argv [ 1 ] , T_HASH ) ; iodine_json_update_settings ( argv [ 1 ] , & s ) ; } if ( argc >= 1 ) Check_Type ( argv [ 0 ] , T_STRING ) ; else rb_raise ( rb_eTypeError , " " ) ; return iodine_json_convert ( argv [ 0 ] , s ) ; ( void ) self ; }
Parse a JSON string using the iodine lenient parser (it's also faster).
Parse a JSON string using the iodine lenient parser ( it ' s also faster ) .