Uses of Interface
jsonvalues.JsValue
-
Packages that use JsValue Package Description com.dslplatform.json.parsers jsonvalues json-values is a one-package and zero-dependency library to work with jsons in a declarative and functional way.jsonvalues.gen jsonvalues.gen.state jsonvalues.spec -
-
Uses of JsValue in com.dslplatform.json.parsers
Methods in com.dslplatform.json.parsers that return JsValue Modifier and Type Method Description JsValueJsArraySpecParser. nullOrArray(com.dslplatform.json.JsonReader<?> reader)JsValueJsSpecParser. parse(com.dslplatform.json.JsonReader<?> reader)Method parameters in com.dslplatform.json.parsers with type arguments of type JsValue Modifier and Type Method Description JsSpecParserJsSpecParsers. ofArrayOfValueEachSuchThat(Function<JsValue,Optional<Error>> p, boolean nullable)JsSpecParserJsSpecParsers. ofValueSuchThat(Function<JsValue,Optional<Error>> predicate) -
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.classJsNumberRepresents an immutable json number.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)returns the element located at the specified index or JsNothing if it doesn't exist.JsValueJsArray. get(JsPath path)JsValueJsObj. get(String key)JsValueJsObj. get(JsPath path)JsValueJson. get(JsPath path)Returns the element located at the given path 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 io.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)static UserErrorUserError. isNotAJsNumber(JsValue elem)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 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, String key7, JsValue el7)Returns a six-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, String key7, JsValue el7, String key8, JsValue el8)Returns a six-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, String key7, JsValue el7, String key8, JsValue el8, String key9, JsValue el9)Returns a six-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, String key7, JsValue el7, String key8, JsValue el8, String key9, JsValue el9, String key10, JsValue el10)Returns a six-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, String key7, JsValue el7, String key8, JsValue el8, String key9, JsValue el9, String key10, JsValue el10, String key11, JsValue el11)Returns a six-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, String key7, JsValue el7, String key8, JsValue el8, String key9, JsValue el9, String key10, JsValue el10, String key11, JsValue el11, String key12, JsValue el12)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.JsObjJsObj. put(String key, JsValue value)Inserts the element at the key in this json, replacing any existing element.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 TJson. putIfAbsent(JsPath path, JsValue value)Inserts at the given path in this json, if no element is present, the specified json value, replacing any existing element in the path and filling withJsNullempty positions in arrays when necessary.default TJson. putIfPresent(JsPath path, JsValue value)Inserts at the given path in this json, if some element is present, the specified value.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 default 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(String key, Function<? super JsValue,? extends JsValue> fn)Inserts the element returned by the function at the given key in this json, replacing any existing elementJsObjJsObj. put(String key, Function<? super JsValue,? extends JsValue> fn)Inserts the element returned by the function at the given key in this json, replacing any existing elementJsObjJsObj. 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.JsObjJsObj. putIfAbsent(String key, Supplier<? extends JsValue> supplier)Inserts the element returned by the supplier at the given key in this json, if no element is present.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.JsObjJsObj. putIfPresent(String key, Function<? super JsValue,? extends JsValue> fn)Inserts at the given key in this json, if some element is present, the element returned by the function.JsObjJsObj. putIfPresent(String key, Function<? super JsValue,? extends JsValue> fn)Inserts at the given key 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.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.Constructor parameters in jsonvalues with type arguments of type JsValue Constructor Description JsObj(io.vavr.collection.HashMap<String,JsValue> myMap) -
Uses of JsValue in jsonvalues.gen
Classes in jsonvalues.gen with type parameters of type JsValue Modifier and Type Interface Description interfaceJsGen<R extends JsValue>classJsGenPair<O extends JsValue>Methods in jsonvalues.gen with type parameters of type JsValue Modifier and Type Method Description default <T extends JsValue>
JsGen<T>JsGen. flatMap(Function<R,JsGen<T>> f)static <O extends JsValue>
JsGenPair<O>JsGenPair. of(String key, JsGen<O> gen)static <O extends JsValue>
JsGen<O>JsGens. oneOf(List<O> list)Methods in jsonvalues.gen that return types with arguments of type JsValue Modifier and Type Method Description static JsGen<JsValue>JsGens. oneOf(JsValue a, JsValue... others)static JsGen<JsValue>JsGens. single(JsValue value)Methods in jsonvalues.gen with parameters of type JsValue Modifier and Type Method Description static JsGen<JsValue>JsGens. oneOf(JsValue a, JsValue... others)static JsGen<JsValue>JsGens. single(JsValue value) -
Uses of JsValue in jsonvalues.gen.state
Method parameters in jsonvalues.gen.state with type arguments of type JsValue Modifier and Type Method Description static JsStateGenJsStateGens. ifContains(String key, Function<JsValue,JsGen<?>> gen) -
Uses of JsValue in jsonvalues.spec
Fields in jsonvalues.spec declared as JsValue Modifier and Type Field Description JsValueError. valueMethods in jsonvalues.spec with parameters of type JsValue Modifier and Type Method Description Set<JsErrorPair>JsArrayOfJsObjSpec. test(JsPath parentPath, JsValue value)Set<JsErrorPair>JsObjSpec. test(JsPath parentPath, JsValue value)Set<JsErrorPair>JsSpec. test(JsPath parentPath, JsValue value)Set<JsErrorPair>JsTupleSpec. test(JsPath parentPath, JsValue value)Method parameters in jsonvalues.spec with type arguments of type JsValue Modifier and Type Method Description static JsSpecJsSpecs. any(Predicate<JsValue> predicate)returns a spec that conforms any value that is evaluated to true on the predicate.static JsArraySpecJsSpecs. array(Predicate<JsValue> predicate)Constructors in jsonvalues.spec with parameters of type JsValue Constructor Description Error(JsValue value, ERROR_CODE code)
-