/*
 * call-seq: indent=(indent)
 *
 * This string is used to indent levels in the JSON text.
 */
static VALUE cState_indent_set(VALUE self, VALUE indent)
{
    GET_STATE(self);
    Check_Type(indent, T_STRING);
    if (RSTRING_LEN(indent) == 0) {
        if (state->indent) {
            ruby_xfree(state->indent);
            state->indent = NULL;
        }
    } else {
        if (state->indent) ruby_xfree(state->indent);
        state->indent = strdup(RSTRING_PTR(indent));
    }
    return Qnil;
}