@SuppressWarnings("unchecked")
    static <T> T parseObject(
            byte[] bytes,
            Type type,
            String format,
            Filter[] filters,
            JSONReader.Feature... features
    ) {
        if (bytes == null || bytes.length == 0) {
            return null;
        }

        JSONReader.Context context = new JSONReader.Context(
                JSONFactory.getDefaultObjectReaderProvider(),
                null,
                filters,
                features
        );
        context.setDateFormat(format);

        boolean fieldBased = (context.features & JSONReader.Feature.FieldBased.mask) != 0;
        ObjectReader<T> objectReader = context.provider.getObjectReader(type, fieldBased);

        try (JSONReader reader = JSONReader.of(bytes, context)) {
            T object = objectReader.readObject(reader, type, null, 0);
            if (reader.resolveTasks != null) {
                reader.handleResolveTasks(object);
            }
            if (reader.ch != EOI && (context.features & IgnoreCheckClose.mask) == 0) {
                throw new JSONException(reader.info("input not end"));
            }
            return object;
        }
    }
Parses the json byte array as {@link T}. Returns
{@code null} if received byte array is {@code null} or empty.

@param bytes the specified UTF8 text to be parsed
@param type the specified actual type
@param format the specified date format
@param filters the specified filters is applied to parsing
@param features the specified features is applied to parsing
@return {@link T} or {@code null}
@throws JSONException If a parsing error occurs
core/src/main/java/com/alibaba/fastjson2/JSON.java