Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-782

Support JSON solver configuration too with SolverFactory.createFromJsonResource

    Details

    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      We could easily support both xml and json for solver configs, by adding SolverFactory.createFromJson*() methods:
      https://github.com/kiegroup/optaplanner/blob/master/optaplanner-core/src/main/java/org/optaplanner/core/api/solver/SolverFactory.java#L88

      XStream supports JSON too, so it's just a matter of copy XStreamXmlSolverFactory and using a different XStream setup:
      https://github.com/kiegroup/optaplanner/blob/master/optaplanner-core/src/main/java/org/optaplanner/core/impl/solver/XStreamXmlSolverFactory.java#L50

      We'll probably want to rename XStreamXmlSolverFactory to XStreamSolverFactory and then make the json/xml switch a boolean constructor parameter?

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ge0ffrey Geoffrey De Smet
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: