Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
XML vs. JSON
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Licenser  
View profile  
 More options Aug 25 2009, 10:24 am
From: Licenser <heinz.g...@gmail.com>
Date: Tue, 25 Aug 2009 07:24:07 -0700 (PDT)
Local: Tues, Aug 25 2009 10:24 am
Subject: XML vs. JSON
Hi everyone,
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?

Best regards,
Heinz


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Meikel Brandmeyer  
View profile  
 More options Aug 25 2009, 11:03 am
From: Meikel Brandmeyer <m...@kotka.de>
Date: Tue, 25 Aug 2009 08:03:01 -0700 (PDT)
Local: Tues, Aug 25 2009 11:03 am
Subject: Re: XML vs. JSON
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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Richard Newman  
View profile  
 More options Aug 25 2009, 11:19 am
From: Richard Newman <holyg...@gmail.com>
Date: Tue, 25 Aug 2009 08:19:10 -0700
Local: Tues, Aug 25 2009 11:19 am
Subject: Re: XML vs. JSON

> Hi everyone,
> I wonder what is the reason clojure uses XML standard wise and not
> JSON.

> …

> Or do I miss something that makes it important for Clojure to be
> bundled so tightly with XML?

Where did you get the idea that Clojure is tightly bundled with XML?

It uses XML for the build script, because Ant is the build tool.

It includes an XML parsing library because practical work often  
involves working with XML.

clojure-contrib includes JSON parsing.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
J. McConnell  
View profile  
 More options Aug 25 2009, 11:23 am
From: "J. McConnell" <jdo...@gmail.com>
Date: Tue, 25 Aug 2009 11:23:13 -0400
Local: Tues, Aug 25 2009 11:23 am
Subject: Re: XML vs. JSON

On Tue, Aug 25, 2009 at 10:24 AM, Licenser <heinz.g...@gmail.com> wrote:

> I wonder what is the reason clojure uses XML standard wise and not
> JSON.

I don't think Clojure has standardized in any way on XML. There just happens
to be an XML parsing lib in Clojure proper because it's a useful thing to
have. There is a JSON parser in Clojure Contrib. There's another one
floating around too, if I'm not mistaken.

> On another note, wouldn't Clojure itself or rather a subset of clojure
> be best to represent data? So to say something like CON?

This is certainly possible and if you control both the reader and the
writer, I would argue it's the best way to go. For interoperability with
other services, however, I don't think there's any getting away from XML and
JSON in the near future.

> Or do I miss something that makes it important for Clojure to be
> bundled so tightly with XML?

I don't see any tight bundling between Clojure and XML.

Regards,

- J.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
B Smith-Mannschott  
View profile  
 More options Aug 25 2009, 11:28 am
From: B Smith-Mannschott <bsmith.o...@gmail.com>
Date: Tue, 25 Aug 2009 17:28:03 +0200
Local: Tues, Aug 25 2009 11:28 am
Subject: Re: XML vs. JSON

On Tue, Aug 25, 2009 at 16:24, Licenser<heinz.g...@gmail.com> wrote:

> Hi everyone,
> 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?

Alas, XML has long past the point of being merely a buzzword. Some
ability to consume and produce XML is a necessity for interoperability
in many domains. Also beyond data-exchange XML also supports document
authoring applications and mixed content, where solutions like JSON
aren't so great. (In fairness, XML's not so great either. I'd rather
use ResturctedText).

JSON has turned out well, for what it does. If there isn't already a
JSON parser in clojure-contrib, perhaps you'd like to contribute one?
I'm sure it would find takers.

> On another note, wouldn't Clojure itself or rather a subset of clojure
> be best to represent data? So to say something like CON?

Yup, for clojure-only applications though there's no need for either
XML or JSON: we can just use clojure's (prn) (read).

> Or do I miss something that makes it important for Clojure to be
> bundled so tightly with XML?

I wouldn't consider Clojure to be bundled tightly with XML. There's a
single (rather simplistic) clojure.xml module included with the
language, which provides rudimentary namespace-ignorant XML support.

> Best regards,
> Heinz

// Ben

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonathan Smith  
View profile  
 More options Aug 25 2009, 1:17 pm
From: Jonathan Smith <jonathansmith...@gmail.com>
Date: Tue, 25 Aug 2009 10:17:13 -0700 (PDT)
Local: Tues, Aug 25 2009 1:17 pm
Subject: Re: XML vs. JSON

On Aug 25, 11:28 am, B Smith-Mannschott <bsmith.o...@gmail.com> wrote:

I like JSON for pulling data out of web apis, combined with the parser
it becomes very convenient.

> JSON has turned out well, for what it does. If there isn't already a
> JSON parser in clojure-contrib, perhaps you'd like to contribute one?
> I'm sure it would find takers.

There is one in contrib, I've used it a bit and it is quite good.

> > On another note, wouldn't Clojure itself or rather a subset of clojure
> > be best to represent data? So to say something like CON?

> Yup, for clojure-only applications though there's no need for either
> XML or JSON: we can just use clojure's (prn) (read).

Yeah, I made my own ad-hoc transactional caching thing, and it was
quite nice being able to simply print stuff out line by line and then
read it in with  { } wrapped around it.

The code is similar to the code for memoise, just with an extra step
of writing stuff to file and reading it in at a certain time.

(interestingly means you can disk cache any fn that is referentially
transparent and returns a clojure structure).


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »