For some use cases it is desirable that the Values produced by parsing EDN text be able to participate in Java Serialization.
This branch teaches Keyword, Symbol, Tag, TaggedValue and DelegatingList to be Serializable.
The case of Keyword is complicated by the fact that Keyword instances are controlled. We use a SerializationProxy which implements readResolve() by calling newKeyword() so as to maintain the invariant:
For some use cases it is desirable that the Values produced by parsing EDN text be able to participate in Java Serialization.
This branch teaches Keyword, Symbol, Tag, TaggedValue and DelegatingList to be Serializable.
The case of Keyword is complicated by the fact that Keyword instances are controlled. We use a SerializationProxy which implements readResolve() by calling newKeyword() so as to maintain the invariant:
That is, any two keywords are identical if and only if they were created from any two equal Symbols.
Note that newKeyword(prefix, name) is exactly equivalent to newKeyword(newSymbol(prefix, name)).