public void FromJsonObject()

in src/main/java/com/aliyun/openservices/log/common/Topostore.java [135:178]


    public void FromJsonObject(JSONObject dict) throws LogException {
        setName(dict.getString(Consts.TOPOSTORE_NAME));
        setTag(dict.getString(Consts.TOPOSTORE_TAG));

        // description
        if (dict.containsKey(Consts.TOPOSTORE_DESCRIPTION)) {
            setDescription(dict.getString(Consts.TOPOSTORE_DESCRIPTION));
        }

        // schema
        if (dict.containsKey(Consts.TOPOSTORE_SCHEMA)) {
            setSchema(dict.getString(Consts.TOPOSTORE_SCHEMA));
            try {
                JSONObject.parseObject(dict.getString(Consts.TOPOSTORE_SCHEMA));
            } catch (JSONException e) {
                throw new LogException(ErrorCodes.BAD_RESPONSE, "response topostore schema is not valid json", e,
                        e.getMessage());
            }
        }

        // acl
        if (dict.containsKey(Consts.TOPOSTORE_ACL)) {
            setAcl(dict.getString(Consts.TOPOSTORE_ACL));
            try {
                JSONObject.parseObject(dict.getString(Consts.TOPOSTORE_ACL));
            } catch (JSONException e) {
                throw new LogException(ErrorCodes.BAD_RESPONSE, "response topostore acl is not valid json", e,
                        e.getMessage());
            }
        }

        // extInfo
        if (dict.containsKey(Consts.TOPOSTORE_EXTINFO)) {
            setExtInfo(dict.getString(Consts.TOPOSTORE_EXTINFO));
        }

        if (dict.containsKey(Consts.TOPOSTORE_CREATE_TIME)) {
            createTime = dict.getIntValue(Consts.TOPOSTORE_CREATE_TIME);
        }

        if (dict.containsKey(Consts.TOPOSTORE_LAST_MODIFY_TIME)) {
            lastModifyTime = dict.getIntValue(Consts.TOPOSTORE_LAST_MODIFY_TIME);
        }
    }