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.
        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