Class JsonHelper
java.lang.Object
org.palladiosimulator.protocom.framework.java.ee.main.JsonHelper
The JsonHelper class is used to convert object from and to JSON.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
JsonHelper
public JsonHelper()
-
-
Method Details
-
toJson
Converts the specified object to a JSON string.- Parameters:
object
- the object to convert- Returns:
- a JSON string representing the object
-
fromJson
Converts a JSON string to an object.- Type Parameters:
T
- the type of the object- Parameters:
json
- the JSON string to convertclazz
- the class of the object- Returns:
- an object represented by the JSON string
-