public class MappingGeneratorImpl extends Object implements MappingGenerator
| Modifier and Type | Method and Description |
|---|---|
void |
doWriteObject(Object object,
javax.json.stream.JsonGenerator generator,
boolean writeBody) |
javax.json.stream.JsonGenerator |
getJsonGenerator() |
MappingGenerator |
writeObject(Object object,
javax.json.stream.JsonGenerator generator)
Write the given Object o into the current JSON layer.
|
public javax.json.stream.JsonGenerator getJsonGenerator()
getJsonGenerator in interface MappingGeneratorJsonGenerator used internally to write the JSON output.public MappingGenerator writeObject(Object object, javax.json.stream.JsonGenerator generator)
MappingGenerator
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"}
writeObject in interface MappingGeneratorobject - the object to writegenerator - the jsonp generator to usepublic void doWriteObject(Object object, javax.json.stream.JsonGenerator generator, boolean writeBody)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.