MESAInternational / B2MML-BatchML

B2MML is an XML implementation of the ANSI/ISA-95, Enterprise-Control System Integration, family of standards (ISA-95), known internationally as IEC/ISO 62264. B2MML consists of a set of XML schemas written using the World Wide Web Consortium's XML Schema language (XSD) that implement the data models in the ISA-95 standard.
Other
93 stars 45 forks source link

B2MML-JSON: some findings/issues #78

Closed thucnguyen77 closed 1 year ago

thucnguyen77 commented 2 years ago

Even though I have successfully generated the C# POCO model from the JSON schema. Many issues I had to fix in order to bring it up to a usable level.

Hope someone can have a look and fix, if the findings are valid.

Dennis-Brandl commented 1 year ago

Comments: 1) The .b2MML and b2mml were automatically added by the XML Spy tool used. Updated the version to remove these two prefixes. No problems notes in XMLSpy 2021 or Visual Studio 2022. 2) Duplicated types were because of the combination of B2MML and BatchML and conversion from XML. Not sure it is worth the effort to fix the JSON, since it will become out of sync with the XML.

  1. The DateTime is a core component type that contains attributes, the dateTime is a basic XML type, ithout the associated UN/CEFACT attributes.
  2. I am not sure what the typos are.
Dennis-Brandl commented 1 year ago

I used XML Spy to convert the XML schema to a JSON Schema, using the the "http://json-schema.org/2020-12/schema" I removed the b2mml: and .b2mml: prefixes. I imported the JSON schema into Visual Studio 2022 using the Edit -Paste Special - Paste JSON as Classes. There is still a namespace conflict for the definitions of "Othervalue", "Name", "Name1", and Format". These would have to be manually fixed, unless someone has a simple solution.

Dennis-Brandl commented 1 year ago

I will close this, and ask for a new issue to be opened on the new version, if the typos still exist. I couldn't find them. This JSON version also uses the new 2020-12 JSON Schema, so it should be checked for additional problems.