Class JsonObjectHandler

    • Constructor Detail

      • JsonObjectHandler

        public JsonObjectHandler()
    • Method Detail

      • handles

        public boolean handles​(Class cls)
        Checks whether the handler can process the given object.
        Specified by:
        handles in class AbstractObjectHandler<net.minidev.json.JSONAware>
        Parameters:
        cls - the class to check
        Returns:
        true if handler can process the object
      • parse

        public net.minidev.json.JSONAware parse​(String s)
        Parses the given string.
        Specified by:
        parse in class AbstractObjectHandler<net.minidev.json.JSONAware>
        Parameters:
        s - the string
        Returns:
        the generated object, null if failed to convert
      • format

        public String format​(net.minidev.json.JSONAware obj)
        Turns the given object back into a string.
        Specified by:
        format in class AbstractObjectHandler<net.minidev.json.JSONAware>
        Parameters:
        obj - the object to convert into a string
        Returns:
        the string representation