users@jersey.java.net

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

From: Paul Taylor <paul_t100_at_fastmail.fm>
Date: Mon, 16 Nov 2009 22:17:41 +0000

Jakub Podlesak wrote:
> 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

Jakub, sorry forgot to check this mailinglist , yes score isnt defined
because score isnt a part of the schema for simply describing musical
content, it only comes into play when using Lucene to find matches
against the database. But when I add the score to the document I do this

 return new QName("http://musicbrainz.org/ns/ext#-2.0", "score", "ext");

which I thought was the correct thing to do.

I can endeavour to create a simple test case but if the score is causing
the issue do you have an idea of how I could fix this by either

Modifying my QName Code or manually changing the xml to define score
that the classes are created from

Paul