if (qname != null && ignoreNamespaces && (isCollection || dropRootNeeded)) {
qname = new QName(qname.getLocalPart());
}
Configuration config =
JSONUtils.createConfiguration(namespaceMap,
writeXsiType && !ignoreNamespaces,
attributesToElements,
typeConverter);
if (!dropElementsInXmlStream && super.outDropElements != null) {
config.setIgnoredElements(outDropElements);
}
if (!writeNullAsString) {
config.setWriteNullAsString(writeNullAsString);
}
if (ignoreEmptyArrayValues) {
config.setIgnoreEmptyArrayValues(ignoreEmptyArrayValues);
}
boolean dropRootInJsonStream = dropRootElement && !dropElementsInXmlStream;
if (dropRootInJsonStream) {
config.setDropRootElement(true);
}
if (ignoreNamespaces && serializeAsArray && (arrayKeys == null || dropRootInJsonStream)) {
if (arrayKeys == null) {
arrayKeys = new LinkedList<String>();
} else if (dropRootInJsonStream) {