Пример #1
0
  @Override
  protected XMLStreamWriter createStreamWriter(QName typeQName, OutputStream os) throws Exception {

    Configuration config =
        JSONUtils.createConfiguration(namespaceMap, writeXsiType && !ignoreNamespaces, false, null);
    XMLStreamWriter writer =
        JSONUtils.createStreamWriter(
            os,
            typeQName,
            writeXsiType && !ignoreNamespaces,
            config,
            serializeAsArray,
            arrayKeys,
            dropRootElement);
    return JSONUtils.createIgnoreNsWriterIfNeeded(writer, ignoreNamespaces);
  }
Пример #2
0
 @Override
 protected XMLStreamReader createStreamReader(AegisType typeToRead, InputStream is)
     throws Exception {
   // the namespace map. Oh, the namespace map.
   // This is wrong, but might make unit tests pass until we redesign.
   if (typeToRead != null) {
     namespaceMap.putIfAbsent(typeToRead.getSchemaType().getNamespaceURI(), "ns1");
   }
   return JSONUtils.createStreamReader(is, readXsiType, namespaceMap);
 }