Modify JsonFactory.readResolve() to hopefully work correctly wrt serialization