Uses of Interface
jsonvalues.Json
-
-
Uses of Json in jsonvalues
Classes in jsonvalues with type parameters of type Json Modifier and Type Interface Description interface
Json<T extends Json<T>>
Represents a json of type T, where T is the type of the container, either a JsObj or a JsArray.Subinterfaces of Json in jsonvalues Modifier and Type Interface Description interface
JsArray
Represents a json array, which is an ordered list of elements.interface
JsObj
Represents a json object, which is an unordered set of name/element pairs.Methods in jsonvalues that return Json Modifier and Type Method Description default Json<?>
JsElem. asJson()
Json<?>
Try. orElseThrow()
Returns the computed Json if the parsed string is a well-formed json, throwing a MalformedJson exception otherwise.Methods in jsonvalues that return types with arguments of type Json Modifier and Type Method Description Optional<Json<?>>
Try. toOptional()
Returns the computed Json wrapped in an optional if the parsed string is a well-formed json, returning an empty optional otherwise.Method parameters in jsonvalues with type arguments of type Json Modifier and Type Method Description <T> T
JsPair. ifJsonElse(BiFunction<JsPath,Json<?>,T> ifJson, BiFunction<JsPath,JsElem,T> ifNotJson)
Declarative way of implementing an if(json)return T; else return T; where T is computed by the given functionsstatic <T> Function<JsElem,T>
MatchExp. ifJsonElse(Function<Json<?>,T> ifJson, Function<JsElem,T> ifNotJson)
return a matching expression to extract jsons out of json elements.default boolean
JsElem. isJson(Predicate<Json<?>> predicate)
Returns true if this elem is a Json and satisfies the given predicate
-