jdereg / json-io

Convert Java to JSON. Convert JSON to Java. Pretty print JSON. Java JSON serializer. Deep copy Java object graphs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compatibility between 4.14.0 and 4.20.0

andre-pt opened this issue · comments

Hi

I have an application on Java 8 and json-io 4.14.0 which I'm migrating to Java 21 and json-io 4.20.0.

I did some tests and it seems latest json-io deserialization works with older version serialized json.

However when testing backwards compatibility it fails. I already figured that enums are now serialized differently and changed that via writer options, but I'm still having some issues with uuids for instance.

My request here would be if you would know the read and writer options I have to use on the newer version to make it 100% backwards compatible.
Or if that's even possible.

Thank you very much.
André

Is it only UUIDs that are causing you problems? We support reading many older formats. If you want a different format, you could add a new CustomWriter to write the older format.

yes, forward compatibility seems to work fine, but in my case to avoid production issues, I would like the new version (4.20.0) to produce a json which could be read by the older version (4.14.0)

would you have all the serializations changes documented?

thank you

Can you send me two json files, one created by the 4.14.0 and the other by 4.22.0 so that I can see what differences you are seeing? 4.22.0 has options to output enums many different ways, so we should be ok there.

we use json-io as part of an internal library, the data types user very a lot and I cannot enumerate them.
this said, we took the risk and upgrade json-io even if it won't be possible to roll back
thanks for your time