Package de.odysseus.staxon.json

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


  @Test
  public void testArray() throws Exception {
    StringWriter result = new StringWriter();
    JsonXMLStreamWriter writer = createXmlStreamWriter(result, new QName("alice"));
    writer.writeStartDocument();
    writer.writeStartElement("alice");
    writer.writeStartArray("bob");
    writer.writeStartElement("bob");
    writer.writeCharacters("charlie");
    writer.writeEndElement();
    writer.writeStartElement("bob");
View Full Code Here


    StringWriter result = new StringWriter();
    JsonXMLStreamWriter writer = createXmlStreamWriter(result, new QName("alice"));
    writer.writeStartDocument();
    writer.writeStartElement("alice");
    writer.writeStartArray("bob");
    writer.writeStartElement("bob");
    writer.writeCharacters("charlie");
    writer.writeEndElement();
    writer.writeStartElement("bob");
    writer.writeCharacters("david");
    writer.writeEndElement();
View Full Code Here

    writer.writeStartElement("alice");
    writer.writeStartArray("bob");
    writer.writeStartElement("bob");
    writer.writeCharacters("charlie");
    writer.writeEndElement();
    writer.writeStartElement("bob");
    writer.writeCharacters("david");
    writer.writeEndElement();
    writer.writeEndArray();
    writer.writeEndElement();
    writer.writeEndDocument();
View Full Code Here

  @Test
  public void testArray3() throws Exception {
    StringWriter result = new StringWriter();
    JsonXMLStreamWriter writer = createXmlStreamWriter(result);
    writer.writeStartDocument();
    writer.writeStartElement("alice");
    writer.writeStartArray("bob");
    writer.writeStartElement("bob");
    writer.writeCharacters("charlie");
    writer.writeEndElement();
    writer.writeEndArray();
View Full Code Here

    StringWriter result = new StringWriter();
    JsonXMLStreamWriter writer = createXmlStreamWriter(result);
    writer.writeStartDocument();
    writer.writeStartElement("alice");
    writer.writeStartArray("bob");
    writer.writeStartElement("bob");
    writer.writeCharacters("charlie");
    writer.writeEndElement();
    writer.writeEndArray();
    writer.writeEndElement();
    writer.writeEndDocument();
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.