public interface MappingGenerator
JsonGenerator to write JSON
 To write JSON-P structure elements you can use the getJsonGenerator() method.| Modifier and Type | Method and Description | 
|---|---|
| javax.json.stream.JsonGenerator | getJsonGenerator() | 
| MappingGenerator | writeObject(Object o,
           javax.json.stream.JsonGenerator generator)Write the given Object o into the current JSON layer. | 
| default MappingGenerator | writeObject(String key,
           Object o,
           javax.json.stream.JsonGenerator generator) | 
javax.json.stream.JsonGenerator getJsonGenerator()
JsonGenerator used internally to write the JSON output.MappingGenerator writeObject(Object o, javax.json.stream.JsonGenerator generator)
     public class Customer {
         private String firstName;
         private String lastName;
         private Address address;
         ...
     }
 
 then the resulting JSON String will e.g. look like
 
     "firstName":"Karl", "lastName":"SomeName", "address":{"street":"mystreet"}
 o - the object to writegenerator - the jsonp generator to usedefault MappingGenerator writeObject(String key, Object o, javax.json.stream.JsonGenerator generator)
Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.