Hi Jakub,
Who is the expected user of BadgerFish except Jersey ?
I published a blog entry showing the JSON rep from a JAXB bean at:
http://blogs.sun.com/arungupta/entry/totd_8_generating_json_using
None of these JSON reps can be consumed by jMaki.
I authored another entry demonstrating how Jersey endpoint can be
consumed by jMaki:
http://blogs.sun.com/arungupta/entry/totd_10_consuming_json_and
The only way right now is to use low-level JSON APIs and that is very
unfriendly.
I agree that writing pluggable entity providers allow us to have a
"story" but I think it needs to be baked in. I'd expect that jMaki to be
a first-class consumer of Jersey.
You can see a variety of JSON data models expected by jMaki at:
http://wiki.java.net/bin/view/Projects/jMakiDataModels
Let me know if you have any more specific questions and I'll be happy to
answer them for you.
-Arun
Jakub Podlesak wrote:
> Hi Greg,
>
> What you describe is JSON data using Badgerfish[1] notation (see [2]).
> Such a JSON is produced/consumed by Jersey JAXB entity providers.
> They allow you to produce JSON and/or XML from the very same JAXB bean.
> I know that the produced JSON format is somehow not convenient to work with
> for JavaScript developers.
>
> Beside the above, by using JSON specific entity providers (see [3]),
> you can easily control what is being generated and you are
> not only constrained to the Badgerfish.
>
> However, we plan to further work on JAXB providers to support more
> JSON notations to be produced out of JAXB.
>
> I would welcome any examples of JSON data you would like to be generated.
> And also any specific requirements on the desired JSON notation.
>
> CCing the dev list so that others have a chance to communicate their
> requirements as well.
>
> Thanks,
>
> ~Jakub
>
>
> [1]http://badgerfish.ning.com/
> [2]http://blogs.sun.com/japod/entry/json_representation_of_jaxb_object
> [3]http://blogs.sun.com/japod/entry/json_entity_providers_in_jersey
>
> On Tue, Oct 16, 2007 at 12:42:22AM -0700, Greg Murray wrote:
>> Hi Jakub,
>>
>> The JSON format is in essence serialized XML which is not friendly or
>> favorable to JavaScript developers.
>>
>> Arun has worked with Jersey a bit more than myself and may be able to
>> help with the details.
>>
>> Arun, if you have time with all the traveling could you help out
>> identifying the issues again? I need to sleep ;-)
>>
>> Thanks in advance.
>>
>> -G
>>
--
Web Technologies and Standards
Sun Microsystems, Inc.
Blog: http://blogs.sun.com/arungupta