instance method
JSON::Ext::Generator::State#depth=
depth=(depth)
ext/json/generator/generator.c
View on GitHub ↗
static VALUE cState_depth_set(VALUE self, VALUE depth)
{
rb_check_frozen(self);
GET_STATE(self);
state->depth = long_config(depth);
return Qnil;
}
This sets the maximum level of data structure nesting in the generated JSON to the integer depth, max_nesting = 0 if no maximum should be checked.