pr-str and read-string don't handle @ symbols inside keywords properly


  • Type: Enhancement Enhancement
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: Release 1.4
  • Fix Version/s: None
  • Component/s: None
  • Environment:
    Ubuntu 12.04 LTS; Java 1.7.0_05 Java HotSpot(TM) Client VM


user=> (read-string (pr-str {(keyword "key@other") :stuff}))
RuntimeException Map literal must contain an even number of forms  clojure.lang.Util.runtimeException (

pr-str emits "{:key@other :stuff}", which read-string fails to interpret correctly. Either pr-str needs to escape the @ symbol, or read-string needs to handle the symbol inside a keyword.

Background: I'm passing a map with email addresses as keys through Storm bolts, which require a thrift-serializable form. Using the pr-str/read-string combo fails on these keys, so I've fallen back to JSON serialization.


Stuart Halloway made changes -
Field Original Value New Value
Issue Type Defect [ 1 ] Enhancement [ 4 ]
Priority Major [ 3 ] Minor [ 4 ]
Approval Vetted [ 10003 ]
Rich Hickey made changes -
Approval Vetted [ 10003 ]
Alex Miller made changes -
Labels reader print reader
Andy Fingerhut made changes -
Labels print reader checkargs print reader


Vote (0)
Watch (1)


  • Created: