Uses of Interface
jsonvalues.JsValue
-
Packages that use JsValue Package Description jsonvalues json-values is a one-package and zero-dependency library to work with jsons in a declarative and functional way. -
-
Uses of JsValue in jsonvalues
Subinterfaces of JsValue in jsonvalues Modifier and Type Interface Description interfaceJson<T extends Json<T>>Represents a json of type T, where T is the type of the container, either a JsObj or a JsArray.Classes in jsonvalues that implement JsValue Modifier and Type Class Description classJsArrayRepresents a json array, which is an ordered list of elements.classJsBigDecRepresents an immutable json number of type BigDecimal.classJsBigIntRepresents an immutable json number of type BigInteger.classJsBoolRepresents an immutable json boolean.classJsDoubleRepresents an immutable json number of type double.classJsIntRepresents an immutable json number of type integer.classJsLongRepresents an immutable json number of type long.classJsNothingIt's a special json element that represents 'nothing'.classJsNullRepresents null, which a valid json value.classJsObjRepresents a json object, which is an unordered set of name/element pairs.classJsStrRepresents an immutable json string.Fields in jsonvalues declared as JsValue Modifier and Type Field Description JsValueJsPair. valuethe json element.Methods in jsonvalues that return JsValue Modifier and Type Method Description JsValueJsArray. get(int i)JsValueJsArray. get(Position pos)JsValueJsObj. get(Position position)default JsValueJson. get(JsPath path)Returns the element located at the given path orJsNothingif it doesn't exist.JsValueJson. get(Position position)Returns the element located at the key or index specified by the given position orJsNothingif it doesn't exist.JsValueJsArray. head()Returns the first element of this array.JsValueJsArray. last()Returns the last element of this array.Methods in jsonvalues that return types with arguments of type JsValue Modifier and Type Method Description static Consumer<JsValue>MatchExp. accept(Consumer<JsValue> ifValue, Consumer<JsObj> ifObj, Consumer<JsArray> ifArray)Declarative way of consuming an element based on its typeio.vavr.Tuple2<String,JsValue>JsObj. head()Returns a pair with an arbitrary key of this object and its associated element.static <T> Function<JsValue,T>MatchExp. ifArrElse(Function<? super JsArray,T> ifArr, Function<? super JsValue,T> ifNotArr)return a matching expression to extract arrays out of json elements.static <T> Function<JsValue,T>MatchExp. ifBoolElse(Function<? super Boolean,T> ifBoolean, Function<? super JsValue,T> ifNotBoolean)return a matching expression to extract booleans out of json elements.static <T> Function<JsValue,T>MatchExp. ifDecimalElse(DoubleFunction<T> ifDouble, Function<BigDecimal,T> ifBigDecimal, Function<? super JsValue,T> ifOther)return a matching expression to extract decimal numbers out of json elements.static <T> Function<JsValue,T>MatchExp. ifIntegralElse(IntFunction<T> ifInt, LongFunction<T> ifLong, Function<BigInteger,T> ifBigInt, Function<? super JsValue,T> ifOther)return a matching expression to extract integral numbers out of json elements.static <T> Function<JsValue,T>MatchExp. ifJsonElse(Function<? super JsObj,T> ifObj, Function<? super JsArray,T> ifArr, Function<? super JsValue,T> ifValue)return a matching expression to extract objs and arrays out of json elements.static <T> Function<JsValue,T>MatchExp. ifJsonElse(Function<Json<?>,T> ifJson, Function<JsValue,T> ifNotJson)return a matching expression to extract jsons out of json elements.static <T> Function<JsValue,T>MatchExp. ifNothingElse(Supplier<T> nothingSupplier, Function<JsValue,T> elseFn)return a matching expression to extract JsNothing out of json elements.static <T> Function<JsValue,T>MatchExp. ifObjElse(Function<? super JsObj,T> ifObj, Function<? super JsValue,T> ifNotObj)return a matching expression to extract json objects out of json elements.static <T> Function<JsValue,T>MatchExp. ifPredicateElse(Predicate<JsValue> predicate, Function<JsValue,T> ifTrue, Function<JsValue,T> ifFalse)declarative way of implementing an if-else using high order functionsstatic <T> Function<JsValue,T>MatchExp. ifStrElse(Function<? super String,T> ifStr, Function<? super JsValue,T> ifNotStr)returns a matching expression to extract strings out of json elements.Iterator<JsValue>JsArray. iterator()Iterator<io.vavr.Tuple2<String,JsValue>>JsObj. iterator()Methods in jsonvalues with parameters of type JsValue Modifier and Type Method Description JsArrayJsArray. append(JsPath path, JsValue elem)JsArrayJsArray. append(JsValue e, JsValue... others)Adds one or more elements, starting from the first, to the back of this array.JsObjJsObj. append(JsPath path, JsValue elem)TJson. append(JsPath path, JsValue elem)Appends one element to the array located at the given path in this json.default TJson. append(JsPath path, JsValue elem, JsValue... others)Appends one or more elements, starting from the first, to the array located at the given path in this json.booleanJsArray. containsValue(JsValue el)booleanJsObj. containsValue(JsValue el)booleanJson. containsValue(JsValue element)Returns true if this json contains the given element in the first level.default booleanJson. equals(JsValue elem, JsArray.TYPE ARRAY_AS)default booleanJsValue. isSameType(JsValue that)returns true if this elem and the given have the same typestatic JsArrayJsArray. of(JsValue e)static JsArrayJsArray. of(JsValue e, JsValue e1)Returns an immutable two-element array.static JsArrayJsArray. of(JsValue e, JsValue e1, JsValue e2)Returns an immutable three-element array.static JsArrayJsArray. of(JsValue e, JsValue e1, JsValue e2, JsValue e3)Returns an immutable four-element array.static JsArrayJsArray. of(JsValue e, JsValue e1, JsValue e2, JsValue e3, JsValue e4)Returns an immutable five-element array.static JsArrayJsArray. of(JsValue e, JsValue e1, JsValue e2, JsValue e3, JsValue e4, JsValue... rest)Returns an immutable array.static JsObjJsObj. of(String key, JsValue el)Returns a one-element immutable object.static JsObjJsObj. of(String key1, JsValue el1, String key2, JsValue el2)Returns a two-element immutable object.static JsObjJsObj. of(String key1, JsValue el1, String key2, JsValue el2, String key3, JsValue el3)Returns a three-element immutable object.static JsObjJsObj. of(String key1, JsValue el1, String key2, JsValue el2, String key3, JsValue el3, String key4, JsValue el4)Returns a four-element immutable object.static JsObjJsObj. of(String key1, JsValue el1, String key2, JsValue el2, String key3, JsValue el3, String key4, JsValue el4, String key5, JsValue el5)Returns a five-element immutable object.static JsObjJsObj. of(String key1, JsValue el1, String key2, JsValue el2, String key3, JsValue el3, String key4, JsValue el4, String key5, JsValue el5, String key6, JsValue el6)Returns a six-element immutable object.static JsPairJsPair. of(JsPath path, JsValue elem)Returns a json pair from the path and the json element.JsArrayJsArray. prepend(JsPath path, JsValue elem)JsArrayJsArray. prepend(JsValue e, JsValue... others)Adds one or more elements, starting from the last, to the front of this array.JsObjJsObj. prepend(JsPath path, JsValue elem)TJson. prepend(JsPath path, JsValue elem)prepends one element to the array located at the path in this json.default TJson. prepend(JsPath path, JsValue elem, JsValue... others)prepends one or more elements, starting from the first, to the array located at the path in this json.default TJson. put(JsPath path, JsValue element)Inserts the element at the path in this json, replacing any existing element and filling withJsNullempty indexes in arrays when necessary.default longJson. times(JsValue e)default longJson. timesAll(JsValue e)Method parameters in jsonvalues with type arguments of type JsValue Modifier and Type Method Description static Consumer<JsValue>MatchExp. accept(Consumer<JsValue> ifValue, Consumer<JsObj> ifObj, Consumer<JsArray> ifArray)Declarative way of consuming an element based on its typedefault TJson. appendIfPresent(JsPath path, Supplier<? extends JsValue> supplier)Appends the element given by the supplier, to the array located at the given path in this json, returning the same this instance if the array is not present.<T> Trampoline<T>JsArray. ifEmptyElse(Trampoline<T> empty, BiFunction<JsValue,JsArray,Trampoline<T>> fn)static <T> Function<JsValue,T>MatchExp. ifNothingElse(Supplier<T> nothingSupplier, Function<JsValue,T> elseFn)return a matching expression to extract JsNothing out of json elements.static <T> Function<JsValue,T>MatchExp. ifPredicateElse(Predicate<JsValue> predicate, Function<JsValue,T> ifTrue, Function<JsValue,T> ifFalse)declarative way of implementing an if-else using high order functionsstatic <T> Function<JsValue,T>MatchExp. ifPredicateElse(Predicate<JsValue> predicate, Function<JsValue,T> ifTrue, Function<JsValue,T> ifFalse)declarative way of implementing an if-else using high order functionsJsArrayJsArray. mapAllValues(Function<? super JsPair,? extends JsValue> fn)JsArrayJsArray. mapAllValues(Function<? super JsPair,? extends JsValue> fn, Predicate<? super JsPair> predicate)JsObjJsObj. mapAllValues(Function<? super JsPair,? extends JsValue> fn)JsObjJsObj. mapAllValues(Function<? super JsPair,? extends JsValue> fn, Predicate<? super JsPair> predicate)TJson. mapAllValues(Function<? super JsPair,? extends JsValue> fn)Maps all the values of this json.TJson. mapAllValues(Function<? super JsPair,? extends JsValue> fn, Predicate<? super JsPair> predicate)Maps all the values of this json that satisfies a given predicate.JsPairJsPair. mapElem(UnaryOperator<JsValue> map)Returns a new pair with the same path and a new element result of applying the mapping functionJsArrayJsArray. mapValues(Function<? super JsPair,? extends JsValue> fn)JsArrayJsArray. mapValues(Function<? super JsPair,? extends JsValue> fn, Predicate<? super JsPair> predicate)JsObjJsObj. mapValues(Function<? super JsPair,? extends JsValue> fn)JsObjJsObj. mapValues(Function<? super JsPair,? extends JsValue> fn, Predicate<? super JsPair> predicate)TJson. mapValues(Function<? super JsPair,? extends JsValue> fn)Maps the values in the first level of this json.TJson. mapValues(Function<? super JsPair,? extends JsValue> fn, Predicate<? super JsPair> predicate)Maps the values in the first level of this json that satisfies a given predicate.static JsArrayJsArray. ofIterable(Iterable<? extends JsValue> iterable)returns an immutable json array from an iterable of json elementsstatic JsObjJsObj. ofIterable(Iterable<Map.Entry<String,JsValue>> xs)default TJson. prependIfPresent(JsPath path, Supplier<JsValue> supplier)Prepends one element given by a supplier, to the array located at the given path in this json, returning the same this instance if the array is not present.JsArrayJsArray. put(JsPath path, Function<? super JsValue,? extends JsValue> fn)JsArrayJsArray. put(JsPath path, Function<? super JsValue,? extends JsValue> fn)JsObjJsObj. put(JsPath path, Function<? super JsValue,? extends JsValue> fn)JsObjJsObj. put(JsPath path, Function<? super JsValue,? extends JsValue> fn)TJson. put(JsPath path, Function<? super JsValue,? extends JsValue> fn)Inserts the element returned by the function at the given path in this json, replacing any existing element and filling withJsNullempty indexes in arrays when necessary.TJson. put(JsPath path, Function<? super JsValue,? extends JsValue> fn)Inserts the element returned by the function at the given path in this json, replacing any existing element and filling withJsNullempty indexes in arrays when necessary.default TJson. putIf(Predicate<? super JsValue> predicate, JsPath path, Function<? super JsValue,? extends JsValue> fn)Inserts at the given path in this json, if the existing element satisfies the predicate, a new element returned by the function.default TJson. putIf(Predicate<? super JsValue> predicate, JsPath path, Function<? super JsValue,? extends JsValue> fn)Inserts at the given path in this json, if the existing element satisfies the predicate, a new element returned by the function.default TJson. putIf(Predicate<? super JsValue> predicate, JsPath path, Function<? super JsValue,? extends JsValue> fn)Inserts at the given path in this json, if the existing element satisfies the predicate, a new element returned by the function.default TJson. putIfAbsent(JsPath path, Supplier<? extends JsValue> supplier)Inserts at the given path in this json, if no element is present, the element returned by the supplier, replacing any existing element in the path and filling withJsNullempty positions in arrays when necessary.default TJson. putIfPresent(JsPath path, Function<? super JsValue,? extends JsValue> fn)Inserts at the given path in this json, if some element is present, the element returned by the function.default TJson. putIfPresent(JsPath path, Function<? super JsValue,? extends JsValue> fn)Inserts at the given path in this json, if some element is present, the element returned by the function.ParseBuilderParseBuilder. withElemMap(Function<? super JsPair,? extends JsValue> map)adds a function to this builder to map the elements of the json.
-