Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
JSON::Ext::Generator::State#as_json=
as_json=(as_json)
ext/json/generator/generator.c
View on GitHub ↗
static VALUE cState_as_json_set(VALUE self, VALUE as_json)
{
rb_check_frozen(self);
GET_STATE(self);
RB_OBJ_WRITE(self, &state->as_json, as_json_config(as_json));
return Qnil;
}
Sets the Proc used to convert unsupported objects in strict mode.