esme-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vassil Dichev <>
Subject Re: Work on the ESME REST APIs (and some stuff that will be rolled into Lift)
Date Wed, 04 Feb 2009 22:37:33 GMT
Hi David,

That's pretty amazing, given that I'm attempting to integrate a
Twitter-compatible REST API in ESME. I've encountered some similar
problems, which you may have solved already.

At first I thought about generating XML and then converting to JSON-
my line of thinking was that it's fairly easy to manipulate XML in
Scala. Eventually I reached the conclusion this solution would be
flawed, since XML lacks some information necessary for JSON transfer
(it's just not clean overall).

Then I decided to use some internal data structure, which I could
convert to either XML or JSON. I currently have methods to convert a
simple Map/List to XML or JSON. My questions are:

-how do you find out the expected response type- XML or JSON?
-how do the magic methods toXml and asJs work? I encountered such
methods in Lift, but they didn't seem generic enough at first glance.

Depending on the answers, should I wait a bit to see if I can reuse
some if this cool new stuff or is there little overlap?


P.S. The new HttpAuthProtected in Lift is quite cool and I definitely
intend to use it for the HTTP Basic auth Twitter requires.

View raw message