users@jersey.java.net

Re: [Jersey] Json output not always matching xml output

From: Jakub Podlesak <Jakub.Podlesak_at_Sun.COM>
Date: Fri, 13 Nov 2009 18:19:09 +0100

Hi,

On Thu, Nov 12, 2009 at 02:54:39PM +0000, Paul Taylor wrote:
> Paul Sandoz wrote:
> >Hi,
> >
> >This looks like a bug in JSON attribute processing. I will let Jakub
> >deep dive further :-) but that will require that you send schema or
> >send a simple maven project to reproduce.
> >
> >Paul.
> Hi, thanks for the quick reply
>
> Its an opensource project so that makes thing easier, its in two
> separate projects both built with maven, although neither are in a maven
> repos at the moment.
>
> The schema and schema classes are available from svn at
> http://svn.musicbrainz.org/mmd-schema/trunk/brainz-mmd2-jaxb , and is

I am sorry, but in the schema, the score attribute is undefined,
and this part of the XML corresponds to <xs:anyAttribute namespace="##other" processContents="skip"/>
which in fact introduces kind of a black hole in the structure.

Since the codebase you are pointing to is pretty big, and it is hard to reproduce
(i.e. installing the MusicBranz database, Tomcat, ..., what to do next?),
could you please prepare a simple reproducible test case, which i can work with?

Thanks,

~Jakub


> browsable at
> http://bugs.musicbrainz.org/browser/mmd-schema/trunk/brainz-mmd2-jaxb
> The code that is using this schema to generate json is at
> http://svn.musicbrainz.org/search_server/branches/ngs, and the classes
> you might might want to check is:
>
> http://bugs.musicbrainz.org/browser/search_server/branches/ngs/servlet/src/main/java/org/musicbrainz/search/servlet/mmd2/ResultsWriter.java
>
> Paul
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>

-- 
Jakub Podlešák
Software Engineer at SUN Microsystems And CZJUG Co-Leader
http://blogs.sun.com/japod