org.glassfish.jersey.media.json.internal
Class JsonHelper

java.lang.Object
  extended by org.glassfish.jersey.media.json.internal.JsonHelper

public final class JsonHelper
extends java.lang.Object

Collection of JSON processing utility methods.

Author:
Jakub Podlesak

Method Summary
static java.lang.String getRootElementName(java.lang.Class<?> clazz)
          Calculate local name of an appropriate XML element, pretty much the same way as it is done by JAXB 2.1 impl (for situations when we want to pretend the element was present in an incoming stream and all we have is the type information).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRootElementName

public static java.lang.String getRootElementName(java.lang.Class<?> clazz)
Calculate local name of an appropriate XML element, pretty much the same way as it is done by JAXB 2.1 impl (for situations when we want to pretend the element was present in an incoming stream and all we have is the type information). TODO: work out with JAXB guys a better way of doing it, probably we could take it from an existing JAXBContext?

Parameters:
clazz - JAXB bean type.
Returns:
root element name.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.