Clojure JIRAhttp://dev.clojure.org/jira
This file is an XML representation of an issueen-us4.464925-07-2011[CONTRIB-101] eof-value not working in clojure.contrib.jsonhttp://dev.clojure.org/jira/browse/CONTRIB-101
Clojure-Contrib<p>The docs of read-json-from promise eof-error? and eof-value, but these fail to work. This is caused by lines 116-121: <a href="https://github.com/richhickey/clojure-contrib/blob/master/src/main/clojure/clojure/contrib/json.clj#L116-121">https://github.com/richhickey/clojure-contrib/blob/master/src/main/clojure/clojure/contrib/json.clj#L116-121</a></p>
<p>At EOF read returns -1, but evaluating (char -1) on the repl reveals that this does not work, and thus an exception is raised before eof-value could be returned.</p>
<p>This is easily fixed by checking if i is in a valid range, or at least not -1, by doing something like (and (not= i -1) (char i))</p>1.2 on Snow LeopardCONTRIB-101eof-value not working in clojure.contrib.jsonDefectMinorClosedDeclinedStuart SierraPepijn de VosTue, 16 Nov 2010 12:22:48 -0600Thu, 18 Nov 2010 17:07:04 -0600Thu, 18 Nov 2010 17:07:04 -060000<p>You're using an old repository. This has been fixed. <a href="https://github.com/clojure/clojure-contrib">https://github.com/clojure/clojure-contrib</a></p><p>References old github.com/richhickey repository; this has already been fixed.</p>Global Rank