cogs icon indicating copy to clipboard operation
cogs copied to clipboard

Allow derived class content to be serialized/deserialized correctly in all publishers

Open jeremyiverson opened this issue 8 years ago • 3 comments

  • XML: Choice group, with name = $"{ConcreteTypeName}{PropertyName}"
  • JSON: Output type property with the concrete type name

jeremyiverson avatar Jan 25 '18 21:01 jeremyiverson

for xml publisher, also investigate using xsi:type declarations

DanSmith avatar May 08 '18 17:05 DanSmith

As of e677cf31919b40d933f25c4fc8374b2a9914116b the json schema, csharp, and csharp json serializer support this. Xml and csharp json deserialization are still to be done.

The on disk format of the csv must be updated to the current version with new columns by running the cogs rewrite command, and the AllowSubtypes column for a property should be set to true where type discriminators are to be allowed.

DanSmith avatar Oct 02 '18 23:10 DanSmith

As of 4f736e2d9b293992f0adf66b4284f425ccfc57c2 the csharp target will parse type discriminated json.

Review of XML is still needed

DanSmith avatar Oct 03 '18 19:10 DanSmith