JSON support in JAXB

Developers: Jakub Podlesak
Status: ongoing

Jersey supports JSON with JAXB using the badgerfish convention. This works OK but can produce JSON that is difficult for clients to consume.

Investigate better support for JSON with JAXB that easier for clients to consume.


Goal: "Easier to consume" may have different meaning based on concrete client requirements/capabilities.
The way should be in allowing users to configure the format which suits them best.

Configuration: The plan is to allow users to create their own JAXBContext instance and set the json/format related options on it.

JSON formats/notations: Currently jettison library is used by Jersey. Besides above mentioned badgerfish convention it supports so called mapped
convention. It should be at least possible to switch between the two and to specify namespace mapping for the mapping convention.

jMaki support: for jMaki widgets, mapped convention looks fine, but is not sufficient as is. Current issues: TBD

What needs to be implemented:

  1. Jersey: the mean to take JAXBContext from application and use it by message readers/writers
  2. JAXB: provide a way to set options for marshaller/unmarshaller directly via JAXBContext
  3. JAXB: integrate jettison/another lib into JAXB for JSON support
  4. JAXB: implement customizations for jMaki support
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact