Version 2.2.4.
Steps, measured:
SimpleDatabase.load a KDBX file whose entries have history (reproduced with a KDBX 3.1 file and with a KDBX 4 file written by KeePassXC 2.7.10).
save it with SimpleDatabase.
JacksonDatabase.load the saved file.
Result:
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "class" (class org.linguafranca.pwdb.kdbx.jackson.JacksonHistory), not marked as ignorable (one known property: "Entry"])
The exception names a field class on JacksonHistory, which knows only Entry - so the Simple serializer appears to write a class attribute on the History element (inferred from the exception, the XML itself was not inspected). SimpleDatabase.load reads the file. A file written by SimpleDatabase from new entries (no history) loads in JacksonDatabase without error.
So the two serializers of the same library do not read each other's output once history is involved. Ignoring unknown properties on JacksonHistory, or not writing the attribute from Simple, would resolve it.
Context: astrapi69/mystic-crypt-ui#407.
Version 2.2.4.
Steps, measured:
SimpleDatabase.loada KDBX file whose entries have history (reproduced with a KDBX 3.1 file and with a KDBX 4 file written by KeePassXC 2.7.10).saveit withSimpleDatabase.JacksonDatabase.loadthe saved file.Result:
The exception names a field
classonJacksonHistory, which knows onlyEntry- so the Simple serializer appears to write aclassattribute on theHistoryelement (inferred from the exception, the XML itself was not inspected).SimpleDatabase.loadreads the file. A file written bySimpleDatabasefrom new entries (no history) loads inJacksonDatabasewithout error.So the two serializers of the same library do not read each other's output once history is involved. Ignoring unknown properties on
JacksonHistory, or not writing the attribute from Simple, would resolve it.Context: astrapi69/mystic-crypt-ui#407.