Class JSONResponse

    • Constructor Detail

      • JSONResponse

        public JSONResponse()
    • Method Detail

      • onChange

        public void onChange​(String type,
                             String... arguments)
        Description copied from interface: PostResponse
        Records a generic change of the given type with arguments.
        Parameters:
        type - The type of the modification
        arguments - The arguments to the modifications
      • setProperty

        public void setProperty​(String name,
                                Object value)
        This method accepts values that correspond to json primitives or otherwise assumes that the toString() of the value can be parsed as json. If neither is the case it will throw an Exception. Assuming the above holds, it will put the value as json directly into the json value part of the response.
        Overrides:
        setProperty in class AbstractPostResponse
        Parameters:
        name - name of the property
        value - value of the property - either of type {String, Boolean, Number, null} or the toString() is parseable as json
        Throws:
        JSONResponse.JSONResponseException - if the value is not usable
      • getProperty

        public Object getProperty​(String name)
        Description copied from class: AbstractPostResponse
        Returns the generic response property with the given name and type or null if no such property exists.
        Overrides:
        getProperty in class AbstractPostResponse
        Parameters:
        name - the name of the response property
        Returns:
        the requested property (might be null)