static JSONArray parseArray(byte[] bytes) {
        if (bytes == null || bytes.length == 0) {
            return null;
        }

        final JSONReader.Context context = JSONFactory.createReadContext();
        try (JSONReader reader = JSONReader.of(bytes, context)) {
            if (reader.nextIfNull()) {
                return null;
            }
            JSONArray array = new JSONArray();
            reader.read(array);
            if (reader.resolveTasks != null) {
                reader.handleResolveTasks(array);
            }
            if (reader.ch != EOI && (context.features & IgnoreCheckClose.mask) == 0) {
                throw new JSONException(reader.info("input not end"));
            }
            return array;
        }
    }
Parses the json byte array as a {@link JSONArray}. Returns {@code null}
if received byte array is {@code null} or empty or its content is null.

@param bytes the specified UTF8 text to be parsed
@return {@link JSONArray} or {@code null}
@throws JSONException If a parsing error occurs
core/src/main/java/com/alibaba/fastjson2/JSON.java