abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Snell <jasn...@gmail.com>
Subject Re: Question about JSON output from Abdera
Date Thu, 22 Sep 2011 19:54:29 GMT
Well, that's the way it was originally implemented, yes... but that
doesn't necessarily means that's the way it should work. There's never
been a single, generally accepted best practice for Atom serialized as
JSON so it's difficult to say for sure what the behavior should be. It
definitely might be time to revisit this in the new abdera2 codebase.

On Thu, Sep 22, 2011 at 12:08 PM, matthewj <matthewj@oclc.org> wrote:
> Hi,
> I am using Abdera in a web service to output Atom in both xml and json.  The
> xml is fine, but I have a question about the json representation.  I am
> serializing an object into an Entry¹s content element, which is not a
> problem with xml.  However, when I request JSON I expect {³id²:²asdf²,
> ³title²:²title², ³content²: {³something²: ³foobar²}}, but get:
>>> {
>>>  "id":"asdf",
>>>  "title":"title",
>>>  "content":"{\"something\":\"foobar\"}",
>>>  "updated":"2011-09-15T18:13:39.401Z"
>>> }
> Is this the appropriate result in JSON (the content element represented as
> text)?
> Thanks,
> Jack Matthews

View raw message