You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "tiagobento (via GitHub)" <gi...@apache.org> on 2024/03/20 01:24:41 UTC

[PR] kie-issues#1017: `@kie-tools/dmn-marshaller` not respecting `xsd:sequence` declaration order when building XML from JSON [incubator-kie-tools]

tiagobento opened a new pull request, #2203:
URL: https://github.com/apache/incubator-kie-tools/pull/2203

   Closes https://github.com/apache/incubator-kie-issues/issues/1017
   
   The solution consisted of:
   1. Changing the order in which the properties are read from the XSD. Inherited properties go first.
   2. Traversing the Meta mapping together with the JSON object tree, being aware of current prop type.
   3. Iterating through JSON object props in the order declared in the Meta mapping.
   
   I also renamed some types and variables.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1017: `@kie-tools/dmn-marshaller` not respecting `xsd:sequence` declaration order when building XML from JSON [incubator-kie-tools]

Posted by "tiagobento (via GitHub)" <gi...@apache.org>.
tiagobento merged PR #2203:
URL: https://github.com/apache/incubator-kie-tools/pull/2203


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1017: `@kie-tools/dmn-marshaller` not respecting `xsd:sequence` declaration order when building XML from JSON [incubator-kie-tools]

Posted by "yesamer (via GitHub)" <gi...@apache.org>.
yesamer commented on PR #2203:
URL: https://github.com/apache/incubator-kie-tools/pull/2203#issuecomment-2008999422

   @tiagobento Thank you for your quick reaction to fix that issue.
   
   @gitgabrio The solution of having our custom xml <--> json marshaller was largely discussed and agreed upon with the tooling team. I agree with you that reinventing the wheel should always be avoided, but in this case.. we didn't have a wheel! 
   It can be hard to believe, but there's no reliable, well-maintained xml <--> json marshaller in npm libraries. @pefernan spent a lot of time analyzing and assessing all the available solutions, and no one fits our needs. Hard to believe but that is. I checked that by myself and I confirm that.  [jsonx](https://github.com/highsource/jsonix) you mentioned would be a good candidate... but the project is dead, sadly because the [project's maintainer is dead](https://github.com/highsource/jsonix/issues/255).
   Regarding the quality and reliability of the solution, we tested it with a very representative DMN file, and the results were very promising from the beginning. The new DMN editor is based on that marshaller, and I believe that everyone working on that can confirm the reliability of the marshaller.
   The new scesim editor is based on that marshaller as well, and I can confirm its reliability. I found just a bug that Tiago immediately fixed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1017: `@kie-tools/dmn-marshaller` not respecting `xsd:sequence` declaration order when building XML from JSON [incubator-kie-tools]

Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio commented on PR #2203:
URL: https://github.com/apache/incubator-kie-tools/pull/2203#issuecomment-2008727738

   HI @tiagobento thanks for PR.
   IMO, the root problem is the usage of a completely custom-made marshaller (IIUC the code).
   Such approach never works in real use case, simple reason is that xsd are big, they keep changing, and keep the code in sync with changes requires a lot of time and is error prone.
   Even if this modificaiont fix the current problem, it is just one, and probably there are multiple ones that are never been discovered only because not tested.
   The very fact that we found multiple bugs in two hours, testing only five extremely simple models, and none of them is 1.5 specific, should be a clear demonstration of that.
   I may see this as temporary solution, but I think a different approach is needed here.
   Anyway, this is not my area, and I have not your knowledge, so the final choice is yours.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [PR] kie-issues#1017: `@kie-tools/dmn-marshaller` not respecting `xsd:sequence` declaration order when building XML from JSON [incubator-kie-tools]

Posted by "gitgabrio (via GitHub)" <gi...@apache.org>.
gitgabrio commented on PR #2203:
URL: https://github.com/apache/incubator-kie-tools/pull/2203#issuecomment-2009037287

   @yesamer 
   Thanks for the explanation! Yes, it is surprising! Being that the situation, can't say anything more....


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org