Package moe.kyokobot.koe.internal.json
Interface JsonSink<S extends JsonSink<S>>
- Type Parameters:
S- A subclass ofJsonSink.
- All Known Implementing Classes:
JsonAppendableWriter,JsonBuilder,JsonStringWriter
public interface JsonSink<S extends JsonSink<S>>
-
Method Summary
Modifier and TypeMethodDescriptionarray()Starts an array.Starts an array within an object, prefixed with a key.array(String key, Collection<?> c) Emits the start of an array with a key.array(Collection<?> c) Emits the start of an array.end()Ends the current array or object.nul()Emits a 'null' token.Emits a 'null' token with a key.object()Starts an object.Starts an object within an object, prefixed with a key.Emits the start of an object with a key.Emits the start of an object.value(boolean b) Emits a boolean value.value(double d) Emits a double value.value(float f) Emits a float value.value(int i) Emits an integer value.value(long l) Emits a long value.Emits aNumbervalue.Emits an object if it is a JSON-compatible type, otherwise throws an exception.Emits a string value (or null).Emits a boolean value with a key.Emits a double value with a key.Emits a float value with a key.Emits an integer value with a key.Emits a long value with a key.Emits aNumbervalue with a key.Emits an object with a key if it is a JSON-compatible type, otherwise throws an exception.Emits a string value (or null) with a key.
-
Method Details
-
array
Emits the start of an array. -
array
Emits the start of an array with a key. -
object
Emits the start of an object. -
object
Emits the start of an object with a key. -
nul
S nul()Emits a 'null' token. -
nul
Emits a 'null' token with a key. -
value
Emits an object if it is a JSON-compatible type, otherwise throws an exception. -
value
Emits an object with a key if it is a JSON-compatible type, otherwise throws an exception. -
value
Emits a string value (or null). -
value
Emits an integer value. -
value
Emits a long value. -
value
Emits a boolean value. -
value
Emits a double value. -
value
Emits a float value. -
value
Emits aNumbervalue. -
value
Emits a string value (or null) with a key. -
value
Emits an integer value with a key. -
value
Emits a long value with a key. -
value
Emits a boolean value with a key. -
value
Emits a double value with a key. -
value
Emits a float value with a key. -
value
Emits aNumbervalue with a key. -
array
S array()Starts an array. -
object
S object()Starts an object. -
array
Starts an array within an object, prefixed with a key. -
object
Starts an object within an object, prefixed with a key. -
end
S end()Ends the current array or object.
-