java.lang.Object
com.pervasive.datarush.json.ClassSerializer
Utility that should be used for all json-related class serialization.
Currently this first looks to the context classloader, then checks the
classloader that was used for datarush. In the future, this may be made
extensible.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Class<?>deserialize(String str) Deserialize a string, previously produced byserialize(Class).static StringSerialize a class as a string.
-
Method Details
-
deserialize
Deserialize a string, previously produced byserialize(Class).- Parameters:
str- the string to deserialize- Returns:
- the class object
- Throws:
IllegalArgumentException- if the class cannot be resolved
-
serialize
Serialize a class as a string.- Parameters:
clazz- the class- Returns:
- a string that can be deserialized via
deserialize(String)
-