abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Elias Torres <el...@torrez.us>
Subject Re: Jettison for JSON support?
Date Tue, 05 Dec 2006 06:45:32 GMT
We have one James, we just need to ask Ben to check in I believe.


James M Snell wrote:
> One new thing that would definitely be cool is a JSON-to-Atom Parser.
> Impl the Parser interface, take json as input and output FOM classes.
> - James
> Elias Torres wrote:
>> Dan Diephouse wrote:
>>> On 12/5/06, Elias Torres <elias@torrez.us> wrote:
>>>> Dan Diephouse wrote:
>>>>> Hi Elias,
>>>>> Please, I think I am the naive one around here as I'm just getting my
>>>> feet
>>>>> wet with Atom and Abdera. :-)
>>>>> Agreed that JSON and XML are not so easily mapped to each other. The
>>>>> xml:base/id/lang stuff slipped my mind as a potential issue. It seems
>>>> that
>>>>> all the xml:base handling is in the FOM* classes right? So the JSON
>>>> support
>>>>> always outputs the full IRIs?
>>>> That's my intent at least although the code hasn't been thoroughly
>>>> tested. I think we are calling getHref() instead of getResolvedHref().
>>>> But anyways, that's the kinds of things we can do in a custom writer as
>>>> opposed to one that reads it from XML. However, it's still unresolved
>>>> how to map 80% of the most commonly used Atom elements into JSON without
>>>> making it too complicated (e.g. doing string checks for '@' or
>>>> maintaining $-namespaces) for the end-user.
>>> Personally I hate the $ namespaces. Jettison does require an @ for
>>> attributes, so that is another limitation of it. (I could allow users to
>>> override this, which might be a nice feature, but I don't know that it
>>> makes
>>> any difference for this case)
>> Right.
>>>>> And yes, it would not be that hard for a user to use Jettison with the
>>>>> current APIs. I was just wondering if it made sense to use it
>>>> instead of
>>>> a
>>>>> custom mapping. If no, thats OK, thats just one of the things I'm
>>>> trying
>>>> to
>>>>> figure out.
>>>> I guess we could have "multiple" JSONWriters, but I'm not sure we are
>>>> needing that just yet. I think that as we get more users, we'll be able
>>>> to work out a good representation and stick with it. Maybe it's one of
>>>> the automagic ones, maybe it's a custom one.
>>> I wonder if there will ever be a standard Atom-JSON mapping... I'm starting
>>> to see how a custom one makes sense in this case, so I'd probably say stick
>>> with custom and people can use Jettison if they need it. Putting
>>> Jettison in
>>> by default sounds like a square peg for a round hole.
>> I think there will be an Atom-JSON mapping, but it's not until APP
>> really starts getting some use out there. Hopefully, we'll be ready to
>> help with that.
>> Thanks for you interest in Abdera and we are pleased to have you using
>> it and finding ways to make it better.
>> -Elias
>>> - Dan

View raw message