Package fr.uga.pddl4j.plan
Class JsonAdapter
java.lang.Object
fr.uga.pddl4j.plan.JsonAdapter
- All Implemented Interfaces:
Serializable
This class is used to convert Java plan into its JSON representation.
Its also provide methods to save the JSON String into a file.
- See Also:
- Serialized Form
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
saveInFile(String name)
Save the current jsonPlan into a file.toJsonString(Plan plan)
Return a string of the plan in a json format.
-
Constructor Details
-
JsonAdapter
Create a new adapter.- Parameters:
problem
- the pddl4j problem representation.
-
-
Method Details
-
saveInFile
Save the current jsonPlan into a file.- Parameters:
name
- the name of the saved file.
-
toJsonString
Return a string of the plan in a json format.- Parameters:
plan
- to convert into json string.- Returns:
- the plan in a json string format.
-