abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chad Lung <chad.l...@gmail.com>
Subject Re: Abdera Servlet handling either JSON and XML
Date Fri, 25 Nov 2011 16:03:48 GMT
Hi Edoardo,

Both accepting and sending JSON formatted data is a handy feature.  As
you've already discovered sending back JSON is trivia with adding the
filter in the Abdera Ext. project.  Accepting JSON (ATOM) data is a
different beast altogether.  Currently, the team I'm on is going to tackle
this by using another open source project that will transform incoming JSON
to ATOM XML so no changes are required to the Abdera codebase.  This is a
work in progress but it is one way to handle this issue.

Chad Lung



On Thu, Nov 24, 2011 at 12:43 PM, Edoardo Comar <ECOMAR@uk.ibm.com> wrote:

> Well,
> adding support for *returning* JSON to HTTP requests was easy after all :-)
>
> provider.addFilter(new JSONFilter());
>
>
> however I am now looking at accepting JSON entries in HTTP POST/PUT
>
> I was naively expecting to find a Parser with a JSON-2-Abdera object model
> implementation like the one mentioned in
> org.apache.abdera.parser.NamedParser
>
>  *   Parser parser = abdera.getParserFactory().getParser("json");
>
>
> I can't find any ...
> is this a case of implementing one own's ?
>
> thanks
>
> > From: Edoardo Comar/UK/IBM@IBMGB
> > To: user@abdera.apache.org,
> > Date: 24/11/2011 17:12
> > Subject: Abdera Servlet handling either JSON and XML
> >
> >
> > I have been looking at a sample on how to put together a simple Abdera
> > webservice where the servlet
> > accepts both json and xml
> > and returns its responses formatted according to the client accept
> header.
> >
> > It'd be very nice to see what needs to be changed in the example Employee
> > servlet to get this behavior.
> >
> > thanks,
> > Edoardo Comar
> > IBM SWG UK - Hursley JTC
> >
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message