public Short getShort(String key) {
        Object value = super.get(key);

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

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

        if (value instanceof Number) {
            return ((Number) value).shortValue();
        }

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

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

            return Short.parseShort(str);
        }

        throw new JSONException("Can not cast '" + value.getClass() + "' to short");
    }
Returns the {@link Short} of the associated keys in this {@link JSONObject}.

@param key the key whose associated value is to be returned
@return {@link Short} or null
@throws NumberFormatException If the value of get is {@link String} and it contains no parsable short
@throws JSONException Unsupported type conversion to {@link Short}
core/src/main/java/com/alibaba/fastjson2/JSONObject.java