Hi I am trying to compare two eclipse preferences files with a piece of code I picked from internet Some of the values in the file are version numbers and clojure is throwing number format error. How to force clojure read the properties as strings.
CompilerException java.lang.NumberFormatException: Invalid number: 2.1.2, compiling:(CompareEclipsePrefs.clj:25:21) Code I used is below. Please can someone advise how to prevent number conversion from string (require 'clojure.java.io);' (defn load-props [file-name] (with-open [^java.io.Reader reader (clojure.java.io/reader file-name)] (let [props (java.util.Properties.)] (.load props reader) (into {} (for [[k v] props] [(keyword k) (read-string v)]))))) thanks Manas -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.