Yes, this is possible as long as the second level nested object has a role to stop infinite recursion from occurring. Cycles are not automatically detected.
That's not a solution as it will not restore the same object graph, it will just repeat values.
One way is to to store a table of objects (as identified by id()) encountered during serialization, indexed by the order you encounter them. If you encounter an object you have already serialized, serialize an index into that table. On deserialization, construct the same kind of table, and deserialize an index with a reference to the same object.
thanks for the message. Gonna be honest, I'm not sure what you mean by cycles. Can you elaborate a bit?