Class JsonAdapter

java.lang.Object
fr.uga.pddl4j.plan.JsonAdapter
All Implemented Interfaces:
Serializable

public class JsonAdapter extends Object implements 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 Details

    • JsonAdapter

      public JsonAdapter(Problem problem)
      Create a new adapter.
      Parameters:
      problem - the pddl4j problem representation.
  • Method Details

    • saveInFile

      public void saveInFile(String name)
      Save the current jsonPlan into a file.
      Parameters:
      name - the name of the saved file.
    • toJsonString

      public final String toJsonString(Plan plan)
      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.