public JSONArray getJSONArray(int index) {
        Object value = get(index);

        if (value instanceof JSONArray) {
            return (JSONArray) value;
        }

        if (value instanceof String) {
            String str = (String) value;

            if (str.isEmpty() || "null".equalsIgnoreCase(str)) {
                return null;
            }

            JSONReader reader = JSONReader.of(str);
            if (arrayReader == null) {
                arrayReader = reader.getObjectReader(JSONArray.class);
            }
            return arrayReader.readObject(reader, null, null, 0);
        }

        if (value instanceof List) {
            return new JSONArray((List<?>) value);
        }

        return null;
    }
Returns a byte value at the specified location in this {@link com.alibaba.fastjson2.JSONArray}.

@param index index of the element to return
@return byte
@throws NumberFormatException If the value of get is {@link String} and it contains no parsable byte
@throws JSONException Unsupported type conversion to byte value
@throws IndexOutOfBoundsException if the index is out of range {@code (index < 0 || index >= size())}
fastjson1-compatible/src/main/java/com/alibaba/fastjson/JSONArray.java