Package org.apache.johnzon.mapper
Class JsonObjectGenerator
- java.lang.Object
-
- org.apache.johnzon.mapper.JsonObjectGenerator
-
- All Implemented Interfaces:
jakarta.json.stream.JsonGenerator
,Closeable
,Flushable
,AutoCloseable
public class JsonObjectGenerator extends Object implements jakarta.json.stream.JsonGenerator
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
JsonObjectGenerator.NamedBuilder<T>
-
Field Summary
Fields Modifier and Type Field Description private jakarta.json.JsonArrayBuilder
arrayBuilder
private LinkedList<Object>
builders
private jakarta.json.JsonBuilderFactory
factory
private jakarta.json.JsonObjectBuilder
objectBuilder
-
Constructor Summary
Constructors Constructor Description JsonObjectGenerator(jakarta.json.JsonBuilderFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
jakarta.json.JsonValue
getResult()
jakarta.json.stream.JsonGenerator
write(boolean value)
jakarta.json.stream.JsonGenerator
write(double value)
jakarta.json.stream.JsonGenerator
write(int value)
jakarta.json.stream.JsonGenerator
write(long value)
jakarta.json.stream.JsonGenerator
write(jakarta.json.JsonValue value)
jakarta.json.stream.JsonGenerator
write(String value)
jakarta.json.stream.JsonGenerator
write(String name, boolean value)
jakarta.json.stream.JsonGenerator
write(String name, double value)
jakarta.json.stream.JsonGenerator
write(String name, int value)
jakarta.json.stream.JsonGenerator
write(String name, long value)
jakarta.json.stream.JsonGenerator
write(String name, jakarta.json.JsonValue value)
jakarta.json.stream.JsonGenerator
write(String name, String value)
jakarta.json.stream.JsonGenerator
write(String name, BigDecimal value)
jakarta.json.stream.JsonGenerator
write(String name, BigInteger value)
jakarta.json.stream.JsonGenerator
write(BigDecimal value)
jakarta.json.stream.JsonGenerator
write(BigInteger value)
jakarta.json.stream.JsonGenerator
writeEnd()
jakarta.json.stream.JsonGenerator
writeKey(String name)
jakarta.json.stream.JsonGenerator
writeNull()
jakarta.json.stream.JsonGenerator
writeNull(String name)
jakarta.json.stream.JsonGenerator
writeStartArray()
jakarta.json.stream.JsonGenerator
writeStartArray(String name)
jakarta.json.stream.JsonGenerator
writeStartObject()
jakarta.json.stream.JsonGenerator
writeStartObject(String name)
-
-
-
Field Detail
-
factory
private final jakarta.json.JsonBuilderFactory factory
-
builders
private final LinkedList<Object> builders
-
objectBuilder
private jakarta.json.JsonObjectBuilder objectBuilder
-
arrayBuilder
private jakarta.json.JsonArrayBuilder arrayBuilder
-
-
Method Detail
-
writeStartObject
public jakarta.json.stream.JsonGenerator writeStartObject()
- Specified by:
writeStartObject
in interfacejakarta.json.stream.JsonGenerator
-
writeStartObject
public jakarta.json.stream.JsonGenerator writeStartObject(String name)
- Specified by:
writeStartObject
in interfacejakarta.json.stream.JsonGenerator
-
writeStartArray
public jakarta.json.stream.JsonGenerator writeStartArray()
- Specified by:
writeStartArray
in interfacejakarta.json.stream.JsonGenerator
-
writeStartArray
public jakarta.json.stream.JsonGenerator writeStartArray(String name)
- Specified by:
writeStartArray
in interfacejakarta.json.stream.JsonGenerator
-
writeKey
public jakarta.json.stream.JsonGenerator writeKey(String name)
- Specified by:
writeKey
in interfacejakarta.json.stream.JsonGenerator
-
write
public jakarta.json.stream.JsonGenerator write(String name, jakarta.json.JsonValue value)
- Specified by:
write
in interfacejakarta.json.stream.JsonGenerator
-
write
public jakarta.json.stream.JsonGenerator write(String name, String value)
- Specified by:
write
in interfacejakarta.json.stream.JsonGenerator
-
write
public jakarta.json.stream.JsonGenerator write(String name, BigInteger value)
- Specified by:
write
in interfacejakarta.json.stream.JsonGenerator
-
write
public jakarta.json.stream.JsonGenerator write(String name, BigDecimal value)
- Specified by:
write
in interfacejakarta.json.stream.JsonGenerator
-
write
public jakarta.json.stream.JsonGenerator write(String name, int value)
- Specified by:
write
in interfacejakarta.json.stream.JsonGenerator
-
write
public jakarta.json.stream.JsonGenerator write(String name, long value)
- Specified by:
write
in interfacejakarta.json.stream.JsonGenerator
-
write
public jakarta.json.stream.JsonGenerator write(String name, double value)
- Specified by:
write
in interfacejakarta.json.stream.JsonGenerator
-
write
public jakarta.json.stream.JsonGenerator write(String name, boolean value)
- Specified by:
write
in interfacejakarta.json.stream.JsonGenerator
-
writeNull
public jakarta.json.stream.JsonGenerator writeNull(String name)
- Specified by:
writeNull
in interfacejakarta.json.stream.JsonGenerator
-
write
public jakarta.json.stream.JsonGenerator write(jakarta.json.JsonValue value)
- Specified by:
write
in interfacejakarta.json.stream.JsonGenerator
-
write
public jakarta.json.stream.JsonGenerator write(String value)
- Specified by:
write
in interfacejakarta.json.stream.JsonGenerator
-
write
public jakarta.json.stream.JsonGenerator write(BigDecimal value)
- Specified by:
write
in interfacejakarta.json.stream.JsonGenerator
-
write
public jakarta.json.stream.JsonGenerator write(BigInteger value)
- Specified by:
write
in interfacejakarta.json.stream.JsonGenerator
-
write
public jakarta.json.stream.JsonGenerator write(int value)
- Specified by:
write
in interfacejakarta.json.stream.JsonGenerator
-
write
public jakarta.json.stream.JsonGenerator write(long value)
- Specified by:
write
in interfacejakarta.json.stream.JsonGenerator
-
write
public jakarta.json.stream.JsonGenerator write(double value)
- Specified by:
write
in interfacejakarta.json.stream.JsonGenerator
-
write
public jakarta.json.stream.JsonGenerator write(boolean value)
- Specified by:
write
in interfacejakarta.json.stream.JsonGenerator
-
writeNull
public jakarta.json.stream.JsonGenerator writeNull()
- Specified by:
writeNull
in interfacejakarta.json.stream.JsonGenerator
-
writeEnd
public jakarta.json.stream.JsonGenerator writeEnd()
- Specified by:
writeEnd
in interfacejakarta.json.stream.JsonGenerator
-
flush
public void flush()
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfacejakarta.json.stream.JsonGenerator
-
getResult
public jakarta.json.JsonValue getResult()
-
-