Interface IObjectSerializer
- All Known Implementing Classes:
ObjectSerializer
public interface IObjectSerializer
-
Method Summary
-
Method Details
-
deserialize
Deserializes a JSON string into an object of the specified class type.- Type Parameters:
T
- the type of the object to deserialize.- Parameters:
jsonString
- the JSON string to deserialize.clazz
- theClass
of the object to deserialize.- Returns:
- the deserialized object of type
T
. - Throws:
IllegalArgumentException
- if the JSON string isnull
or empty.
-
serialize
Serializes an object into a JSON string.- Parameters:
object
- the object to serialize.- Returns:
- the serialized JSON string.
- Throws:
IllegalArgumentException
- if the object isnull
.
-