CIHDigitalConfigurator / CIH_Toolkit

CIH_Toolkit
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Add a Json to Specification object converter #39

Open alelom opened 2 years ago

alelom commented 2 years ago

Currently, any Json data containing a Specification or a Condition and that adopts the Json-schema described in the repo: https://github.com/CIHDigitalConfigurator/CIH_Specifications_Schema

can be read using the BH.Engine.Serialisation.FromJson() method. However, the returned object is always a CustomObject, and some manual adjustment is needed to convert it to a C# Specification or Condition:

2022-03-24 12_05_25-

Implement a custom deserialiser to solve this.