I am using Jackson to send JSON data between the client and server. I am trying to use the full Jackson binding function, and I am applying it to standard POJOs. The problem is that Jackson seems to add redundant data while marshaling on the server, so when I try to cancel it back to POJO on the client side, I get an error.
Here's an excerpt from Jackson's line:
{"_ class": "com.mycoomp.MyObject", "_ identifier": {"time": 1300314145000, "new": false, "machine": 1652794940, "on": - 510750341}, "language": "," a type".....
MyObject contains "language" and "type", but it does not contain "time", "new" and "machine" which are not part of it, but on the client side I get this error:
Unrecognized field "time" (class org.bson.types.ObjectId), not marked as ignorant in [Source: java.io.StringReader@1c56c60 ; row: 1, column: 102] (via the chain of links: com.mycomp.MyObject ["_ id"] → org.bson.types.ObjectId ["time"])
Any ideas ...?
source
share