Return-Path: X-Original-To: apmail-abdera-user-archive@www.apache.org Delivered-To: apmail-abdera-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 56D227038 for ; Thu, 22 Sep 2011 19:54:56 +0000 (UTC) Received: (qmail 11690 invoked by uid 500); 22 Sep 2011 19:54:56 -0000 Delivered-To: apmail-abdera-user-archive@abdera.apache.org Received: (qmail 11663 invoked by uid 500); 22 Sep 2011 19:54:56 -0000 Mailing-List: contact user-help@abdera.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@abdera.apache.org Delivered-To: mailing list user@abdera.apache.org Received: (qmail 11655 invoked by uid 99); 22 Sep 2011 19:54:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Sep 2011 19:54:56 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jasnell@gmail.com designates 209.85.214.42 as permitted sender) Received: from [209.85.214.42] (HELO mail-bw0-f42.google.com) (209.85.214.42) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Sep 2011 19:54:50 +0000 Received: by bkar4 with SMTP id r4so3379378bka.15 for ; Thu, 22 Sep 2011 12:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=gTcu9iEC3JRNoLOyYPk/NYke7+JuuDocwrHVQ9pdbg4=; b=dp57qRmsYdSf5c3UV8xMNcwCna06LrHRvP7mjxiBggTgock1FEF2hMUDNqfuNTzpU+ vetT/ycvp5aharQhbb+zAY4YfMTfJJ5hEs2MCIEAbLptaXPAz6935DQGmDnHQ9TpfaWL FBcl1nNKCVjWgRLbiCzehn4O+dA6D/602dyaU= MIME-Version: 1.0 Received: by 10.204.133.73 with SMTP id e9mr1914320bkt.377.1316721269628; Thu, 22 Sep 2011 12:54:29 -0700 (PDT) Received: by 10.204.42.65 with HTTP; Thu, 22 Sep 2011 12:54:29 -0700 (PDT) In-Reply-To: References: Date: Thu, 22 Sep 2011 12:54:29 -0700 Message-ID: Subject: Re: Question about JSON output from Abdera From: James Snell To: user@abdera.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 wrote: > Hi, > > I am using Abdera in a web service to output Atom in both xml and json. = =A0The > xml is fine, but I have a question about the json representation. =A0I am > serializing an object into an Entry=B9s content element, which is not a > problem with xml. =A0However, when I request JSON I expect {=B3id=B2:=B2a= sdf=B2, > =B3title=B2:=B2title=B2, =B3content=B2: {=B3something=B2: =B3foobar=B2}},= but get: >>> >>> { >>> =A0"id":"asdf", >>> =A0"title":"title", >>> =A0"content":"{\"something\":\"foobar\"}", >>> =A0"updated":"2011-09-15T18:13:39.401Z" >>> } >>> >>> > Is this the appropriate result in JSON (the content element represented a= s > text)? > > Thanks, > Jack Matthews >