class FieldReaderStringField<T>
        extends FieldReaderObjectField<T> {
    final boolean trim;
    final boolean emptyToNull;

    FieldReaderStringField(String fieldName, Class fieldType, int ordinal, long features, String format, String defaultValue, JSONSchema schema, Field field) {
        super(fieldName, fieldType, fieldType, ordinal, features, format, null, defaultValue, schema, field);
        trim = "trim".equals(format) || (features & JSONReader.Feature.TrimString.mask) != 0;
        emptyToNull = (features & JSONReader.Feature.EmptyStringAsNull.mask) != 0;
    }

    @Override
    public void readFieldValue(JSONReader jsonReader, T object) {<FILL_FUNCTION_BODY>}

    @Override
    public void readFieldValueJSONB(JSONReader jsonReader, T object) {
        String fieldValue = jsonReader.readString();
        if (trim && fieldValue != null) {
            fieldValue = fieldValue.trim();
        }

        if (schema != null) {
            schema.assertValidate(fieldValue);
        }

        accept(object, fieldValue);
    }

    @Override
    public String readFieldValue(JSONReader jsonReader) {
        String fieldValue = jsonReader.readString();
        if (trim && fieldValue != null) {
            fieldValue = fieldValue.trim();
        }
        return fieldValue;
    }

    public boolean supportAcceptType(Class valueClass) {
        return true;
    }

    @Override
    public void accept(T object, Object value) {
        String fieldValue;
        if (value != null && !(value instanceof String)) {
            fieldValue = value.toString();
        } else {
            fieldValue = (String) value;
        }

        if (trim && fieldValue != null) {
            fieldValue = fieldValue.trim();
        }
        // empty string to null
        if (emptyToNull && fieldValue != null && fieldValue.isEmpty()) {
            fieldValue = null;
        }
        if (schema != null) {
            schema.assertValidate(fieldValue);
        }

        UNSAFE.putObject(object, fieldOffset, fieldValue);
    }
}

        String fieldValue = jsonReader.readString();
        if (trim && fieldValue != null) {
            fieldValue = fieldValue.trim();
        }

        if (schema != null) {
            schema.assertValidate(fieldValue);
        }

        UNSAFE.putObject(object, fieldOffset, fieldValue);
    
<methods>public void accept(T, boolean) ,public void accept(T, byte) ,public void accept(T, short) ,public void accept(T, int) ,public void accept(T, long) ,public void accept(T, float) ,public void accept(T, double) ,public void accept(T, char) ,public void accept(T, java.lang.Object) <variables>