On Sat, Jan 8, 2011 at 13:49, Stuart Sierra <the.stuart.sie...@gmail.com>wrote:

> There's no solution here that will be perfect for all cases. But I've made
> the decision that c.c.json will always "downgrade" Clojure types to the
> nearest equivalent JSON types. It does not promise round-trip preservation
> of types not specified by JSON, such as sets. In this case, that means
> Ratios should become doubles. I've pushed this change to master.
>

I'd spent some time considering supplying a patch similar to this - two
things stopped me and instead had me write the multi-methods supplied later:

 (a) my CA is sat at home un-mailed.
 (b) I kinda like I can send ratio's to and from clojure end points

Is it a terrible idea to provide an optional flag to the parser that says
whether this coercion should take place or not - defaulting to the interop
version, but still preserving the accuracy of numbers if the recipient is
clojure?

-- 
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

Reply via email to