Package de.odysseus.staxon.json

Examples of de.odysseus.staxon.json.JsonXMLStreamWriter.writeEndDocument()


    writer.writeStartElement("bob");
    writer.writeCharacters("david");
    writer.writeEndElement();
    writer.writeEndArray();
    writer.writeEndElement();
    writer.writeEndDocument();
    writer.close();
    Assert.assertEquals("{\"bob\":[\"charlie\",\"david\"]}", result.toString());
  }

View Full Code Here


    writer.writeStartElement("bob");
    writer.writeCharacters("charlie");
    writer.writeEndElement();
    writer.writeEndArray();
    writer.writeEndElement();
    writer.writeEndDocument();
    writer.close();
    Assert.assertEquals("{\"alice\":{\"bob\":[\"charlie\"]}}", result.toString());
  }

  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.