public byte[] getBytes(String key) {
        Object value = get(key);

        if (value == null) {
            return null;
        }

        if (value instanceof byte[]) {
            return (byte[]) value;
        }
        if (value instanceof String) {
            return Base64.getDecoder().decode((String) value);
        }
        throw new JSONException("can not cast to byte[], value : " + value);
    }
Returns a byte value of the associated keys in this {@link JSONObject}.

@param key the key whose associated value is to be returned
@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
core/src/main/java/com/alibaba/fastjson2/JSONObject.java