ObjectInputStream with clojure.lang.PersistentHashMap

I have a strange problem.

  • If I take a clojure card of type String, Long
  • serialize it using java.io.ObjectInputStreamwith clojure 1.6.0
  • deserialize it using java.io.ObjectInputStreamwith clojure 1.5.1

I can print a new map in repl, get all the values ​​with vals, get all the keys with keys, but I can't get the value with get.

(get new-map "stringkey") => nil

However, it into {}fixes everything.

I appreciate that it is probably not a great idea to switch versions when using Java serialization, and I can really fix this problem, but now I'm wondering why this is happening?

+4
source share
1 answer

Clojure 1.6, get , .

+6

All Articles