Class JsonObject
java.lang.Object
io.github.joke.conventionalversion.config.JsonObject
A parsed JSON object, read by key with the type each caller expects.
Every cast out of the untyped tree a JSON parser produces happens here, so the configuration layer above works against checked values. A key holding the wrong type is a malformed configuration and fails rather than being coerced or ignored, because a configuration this project cannot read is a configuration whose versions it cannot predict.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected JsonObjectprotected JsonObjectprotected Stringprotected List<?> booleankeys()The keys present, in the order the document declared them.The elements of an array whose entries are either objects or bare names, with a bare name becoming an object carrying onlynameKey.protected Stringprotected List<?> Anullelement is dropped, for the same reason anullvalue is.requireObject(String key) The object at a key that must be present, for a caller with nothing sensible to do without it.protected <T> TrequireType(String key, Object value, Class<T> type, String expected) The elements of a string array, or empty when the key is absent.protected <T> Optional<T>
-
Constructor Details
-
JsonObject
-
-
Method Details
-
keys
-
has
-
string
-
bool
-
object
-
requireObject
The object at a key that must be present, for a caller with nothing sensible to do without it. -
strings
-
objects
The elements of an array whose entries are either objects or bare names, with a bare name becoming an object carrying onlynameKey.release-pleaseaccepts both shapes for itspluginsarray, and the reader above should not have to care which was used. -
asObject
-
elements
-
present
-
child
-
typed
-
requireType
-
describe
-
path
-