Change in xsd:nil behaviour after upgrading from jackson-dataformat-xml version 2.9.10 to 2.10 #148
Replies: 2 comments 2 replies
-
I investigated the matter further and can confirm that the problem described above is caused by changes introduced in jackson-dataformat-xml module between version 2.9.10 and and 2.10.x. Everything seems to be working fine in 2.9.10, but stops working if 2.10.0 or any newer version of jackson-dataformat-xml library is provided. |
Beta Was this translation helpful? Give feedback.
-
This seems like something to report as a bug, more than starting a discussion on. I don't know off-hand what change there might be, but there have definitely been fixes for empty element handling as that has been a tricky one to support. |
Beta Was this translation helpful? Give feedback.
-
I’m in the process of upgrading dependencies in our project and have recently run into issues when trying to upgrade jackson-databind from version 2.13.2.1 to the latest 2.14.1. The problems I’m currently dealing with are about our unit tests. A few tests are failing after upgrading to the latest version of jackson-databind. All the failing tests are about conversion from XML to JSON. Our tests are simple – we read JSON file, then read XML file, convert it to JSON and compare the two JSONs. Everything works fine with jackson-databind 2.13.2.1, but stopped working after upgrading to the latest 2.14.1. Our code that converts XML to JSON is like this:
Expected JSON file can be found in attached file expected.json, XML file in attached file source.xml, JSON file converted from XML file is in actual.json. It looks something’s changed when it comes to handling empty elements, as content of file ‘actual.json’ no longer matches content of ‘expected.json’. I’m not sure if it’s a bug, or maybe such behaviour is expected and it is up to us to make changes in our code. Could you please provide any suggestion what can we do in order to create JSON file that matches the expected one?
Regards,
Andrzej
files.zip
Beta Was this translation helpful? Give feedback.
All reactions