Jackson JSON Processor

Add JSONP wrapper object in JAX-RS plug-in, to allow for JSONP support by containers

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.5
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

(as suggested by Jakub and Paul on Jersey list)

It would make sense to use a shared wrapper object to indicate that the payload is to be serialized using JSONP wrapping.
The only tricky part is that of how to pass wrapper information to JAX-RS plugin. One simple way is to define standard wrapper object for this purpose; Jersey already has one, so we could just copy it in JAX-RS (see attachment).

Activity

Hide
Tatu Saloranta added a comment -

Propose JSONP wrapper for JAX-RS plug-in

Show
Tatu Saloranta added a comment - Propose JSONP wrapper for JAX-RS plug-in
Hide
Tatu Saloranta added a comment -

Actually, thinking about this a bit, what will make even more sense is simple JSONP-wrapper object type. It can contain any value (including null), and will be serialized using expected wrapping.

Show
Tatu Saloranta added a comment - Actually, thinking about this a bit, what will make even more sense is simple JSONP-wrapper object type. It can contain any value (including null), and will be serialized using expected wrapping.
Hide
Tatu Saloranta added a comment -

Implemented: added 'org.codehaus.jackson.map.util.JSONPObject' which is a wrapper that allows bundling:

  • Value to serialize
  • Function name (for JSONP wrapper)
  • optional type for forcing declared type (superclass of runtime type)
Show
Tatu Saloranta added a comment - Implemented: added 'org.codehaus.jackson.map.util.JSONPObject' which is a wrapper that allows bundling:
  • Value to serialize
  • Function name (for JSONP wrapper)
  • optional type for forcing declared type (superclass of runtime type)
Hide
Tatu Saloranta added a comment -

Was included in 1.5.0

Show
Tatu Saloranta added a comment - Was included in 1.5.0

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: