That won't solve your issue though as some getters of NodeImpl will fail as they should only be used for certain types.
PathImpl and NodeImpl are definitely not designed to be serialized by Jackson.