Class JsonBMapping

    • Constructor Detail

      • JsonBMapping

        public JsonBMapping()
    • Method Detail

      • toJson

        public String toJson​(Object object)
        Description copied from interface: JsonMapping
        Serialize an object to JSON.
        Specified by:
        toJson in interface JsonMapping
        Parameters:
        object - object to serialize
        Returns:
        JSON representation of the object
      • fromJson

        public <T> T fromJson​(String str,
                              Class<T> type)
        Description copied from interface: JsonMapping
        Deserialize an object from it's JSON string representation.
        Specified by:
        fromJson in interface JsonMapping
        Type Parameters:
        T - generic parametrization class
        Parameters:
        str - JSON string
        type - type of object
        Returns:
        object of requested class