public class MappedNamespaceConvention extends Object implements org.codehaus.jettison.Convention, NamespaceContext
MappedNamespaceConvention, modified to fix issue with XML schema validation failing when something like xsi:type="tns:MyType" is used in the
JSON input ("Undeclared prefix 'tns'").
TODO: report this issue to Jettison project
| Constructor and Description |
|---|
MappedNamespaceConvention() |
MappedNamespaceConvention(Configuration config) |
| Modifier and Type | Method and Description |
|---|---|
Object |
convertToJSONPrimitive(String text) |
String |
createAttributeKey(String p,
String ns,
String local) |
String |
createKey(String p,
String ns,
String local) |
QName |
createQName(String rootName,
org.codehaus.jettison.Node node) |
List<?> |
getIgnoredElements() |
String |
getNamespaceSeparator() |
String |
getNamespaceURI(String prefix) |
String |
getPrefix(String namespaceURI) |
Iterator<Object> |
getPrefixes(String arg0) |
Set<?> |
getPrimitiveArrayKeys() |
boolean |
isDropRootElement() |
boolean |
isElement(String p,
String ns,
String local) |
boolean |
isEscapeForwardSlashAlways() |
boolean |
isIgnoreEmptyArrayValues() |
boolean |
isReadNullAsString() |
boolean |
isWriteNullAsString() |
void |
processAttributesAndNamespaces(org.codehaus.jettison.Node n,
org.codehaus.jettison.json.JSONObject object) |
void |
setEscapeForwardSlashAlways(boolean escapeForwardSlash) |
public MappedNamespaceConvention()
public MappedNamespaceConvention(Configuration config)
public void processAttributesAndNamespaces(org.codehaus.jettison.Node n,
org.codehaus.jettison.json.JSONObject object)
throws org.codehaus.jettison.json.JSONException
processAttributesAndNamespaces in interface org.codehaus.jettison.Conventionorg.codehaus.jettison.json.JSONExceptionpublic String getNamespaceURI(String prefix)
getNamespaceURI in interface NamespaceContextpublic String getPrefix(String namespaceURI)
getPrefix in interface NamespaceContextpublic Iterator<Object> getPrefixes(String arg0)
getPrefixes in interface NamespaceContextpublic QName createQName(String rootName, org.codehaus.jettison.Node node)
createQName in interface org.codehaus.jettison.Conventionpublic Set<?> getPrimitiveArrayKeys()
public boolean isDropRootElement()
public List<?> getIgnoredElements()
public boolean isWriteNullAsString()
public boolean isReadNullAsString()
public boolean isIgnoreEmptyArrayValues()
public boolean isEscapeForwardSlashAlways()
public void setEscapeForwardSlashAlways(boolean escapeForwardSlash)
public String getNamespaceSeparator()
Copyright © 2012–2020. All rights reserved.