Hi,

On Aug 25, 4:24 pm, Licenser <heinz.g...@gmail.com> wrote:

> I wonder what is the reason clojure uses XML standard wise and not
> JSON. In the past I've found that JSON is much cleaner to read, and
> much easier to represent data structures in. I know XML is a buzzword,
> but JSON is on it's way to become one too. And yes I know Java uses
> XML extensively, in my eyes too extensively in many parts, but isn't
> one goal of Clojure not to repeat Javas mistakes?
>
> On another note, wouldn't Clojure itself or rather a subset of clojure
> be best to represent data? So to say something like CON?
>
> Or do I miss something that makes it important for Clojure to be
> bundled so tightly with XML?

The "usual" approach is to use print and read to (de-)serialise
Clojure values (see also *print-dup*). The only place where Clojure is
in some way "bundled" with XML is clojure.xml. But you don't have to
use it. Clojure works perfectly fine without it. In clojure-contrib
there is also a JSON reader/writer.

So Clojure actually provides you with all three ways, without forcing
or prefering one style.

I mostly use XML for serialisation because I have to interface into
Java libraries, which use it. Hence in my situation XML has the least
impedance mismatch.

Sincerely
Meikel

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