powsybl-core icon indicating copy to clipboard operation
powsybl-core copied to clipboard

Making contingency JSON format extensible

Open sylvlecl opened this issue 2 years ago • 0 comments

  • Do you want to request a feature or report a bug?

Feature.

  • What is the current behavior?

The contingency JSON loader is not extensible : only list types defined in powsybl-core are handled.

  • What is the expected behavior?

It would be nice to allow third parties to use their own types of list. To achieve this, we need to allow them to define the JSON serialization for their types.

This implies to:

  1. Add some typing information in the JSON representation of lists
  2. Allow users to register their jackson module into the ContingencyJsonModule
  3. Increment the format version to 2.0 and handle the support for still reading 1.0
  • What is the motivation / use case for changing the behavior?

Allow third parties to use their own contingency list implementation with the framework.

sylvlecl avatar Aug 08 '22 09:08 sylvlecl