public JsonStructureReader(Unmarshaller u, Class clazz) { this.attributePrefix = u.getAttributePrefix(); if (Constants.EMPTY_STRING.equals(attributePrefix)) { attributePrefix = null; } namespaces = u.getNamespaceResolver(); setNamespaceAware(u.getNamespaceResolver() != null); setNamespaceSeparator(u.getNamespaceSeparator()); this.includeRoot = u.isIncludeRoot(); this.setErrorHandler(u.getErrorHandler()); this.textWrapper = u.getValueWrapper(); this.unmarshalClass = clazz; this.jsonTypeCompatibility = u.getJsonTypeConfiguration().useJsonTypeCompatibility(); }
public JsonStructureReader(Unmarshaller u, Class clazz) { this.attributePrefix = u.getAttributePrefix(); if (Constants.EMPTY_STRING.equals(attributePrefix)) { attributePrefix = null; } namespaces = u.getNamespaceResolver(); setNamespaceAware(u.getNamespaceResolver() != null); setNamespaceSeparator(u.getNamespaceSeparator()); this.includeRoot = u.isIncludeRoot(); this.setErrorHandler(u.getErrorHandler()); this.textWrapper = u.getValueWrapper(); this.unmarshalClass = clazz; this.jsonTypeCompatibility = u.getJsonTypeConfiguration().useJsonTypeCompatibility(); }
unmarshalRecord.setTypeQName(qname); if(!unmarshalRecord.isNamespaceAware() || !unmarshalRecord.getUnmarshaller().getJsonTypeConfiguration().useXsdTypesWithPrefix()){ qname = new QName(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI ,frag.getLocalName()); unmarshalRecord.setTypeQName(qname);
unmarshalRecord.setTypeQName(qname); if(!unmarshalRecord.isNamespaceAware() || !unmarshalRecord.getUnmarshaller().getJsonTypeConfiguration().useXsdTypesWithPrefix()){ qname = new QName(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI ,frag.getLocalName()); unmarshalRecord.setTypeQName(qname);
if(!unmarshalRecord.isNamespaceAware() || !unmarshalRecord.getUnmarshaller().getJsonTypeConfiguration().useXsdTypesWithPrefix()){ QName qName = new QName(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI, xsiType);
if(!unmarshalRecord.isNamespaceAware() || !unmarshalRecord.getUnmarshaller().getJsonTypeConfiguration().useXsdTypesWithPrefix()){ QName qName = new QName(javax.xml.XMLConstants.W3C_XML_SCHEMA_NS_URI, xsiType);
unmarshalRecord.getUnmarshaller().getJsonTypeConfiguration().getJsonTypeAttributeName() != null && atts.getValue(unmarshalRecord.getUnmarshaller().getJsonTypeConfiguration().getJsonTypeAttributeName()) != null) { QName qname = new QName(xmlDescriptor.getSchemaReference().getSchemaContextAsQName().getNamespaceURI(), atts.getValue(unmarshalRecord.getUnmarshaller().getJsonTypeConfiguration().getJsonTypeAttributeName())); classValue = (Class)xmlDescriptor.getInheritancePolicy().getClassIndicatorMapping().get(qname);
if (xmlDescriptor == null || (unmarshaller.getMediaType() == MediaType.APPLICATION_JSON && unmarshaller.getJsonTypeConfiguration().getJsonTypeAttributeName() != null && !Constants.SCHEMA_TYPE_ATTRIBUTE.equals(unmarshaller.getJsonTypeConfiguration().getJsonTypeAttributeName()))) { boolean isPrimitiveType = false; String type = null; if(xmlReader.isNamespaceAware()){ type = atts.getValue(javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, Constants.SCHEMA_TYPE_ATTRIBUTE); } else if (unmarshaller.getMediaType() != MediaType.APPLICATION_JSON || unmarshaller.getJsonTypeConfiguration().useJsonTypeCompatibility()) { type = atts.getValue(Constants.EMPTY_STRING, Constants.SCHEMA_TYPE_ATTRIBUTE); } else if (unmarshaller.getMediaType() == MediaType.APPLICATION_JSON && unmarshaller.getJsonTypeConfiguration().getJsonTypeAttributeName() != null) { type = atts.getValue(Constants.EMPTY_STRING, unmarshaller.getJsonTypeConfiguration().getJsonTypeAttributeName());
if(xmlReader.isNamespaceAware()){ type = atts.getValue(javax.xml.XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, Constants.SCHEMA_TYPE_ATTRIBUTE); } else if (unmarshaller.getMediaType() != MediaType.APPLICATION_JSON || unmarshaller.getJsonTypeConfiguration().useJsonTypeCompatibility()) { type = atts.getValue(Constants.EMPTY_STRING, Constants.SCHEMA_TYPE_ATTRIBUTE);