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.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(java.util.function.Function<JsValue,java.util.Optional<Error>> p, boolean nullable)JsSpecParserJsSpecParsers. ofValueSuchThat(java.util.function.Function<JsValue,java.util.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.classJsBinaryRepresents an array of bytes.classJsBoolRepresents an immutable json boolean.classJsDoubleRepresents an immutable json number of type double.classJsInstantRepresents an immutable instant.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.classJsPrimitiveclassJsStrRepresents an immutable json string.Fields in jsonvalues declared as JsValue Modifier and Type Field Description JsValueJsPair. valuethe json value.Fields in jsonvalues with type parameters of type JsValue Modifier and Type Field Description static Prism<JsValue,JsArray>JsArray. prismprism between the sum type JsValue and JsArraystatic Prism<JsValue,java.math.BigDecimal>JsBigDec. prismprism between the sum type JsValue and JsBigDecstatic Prism<JsValue,java.math.BigInteger>JsBigInt. prismstatic Prism<JsValue,byte[]>JsBinary. prismprism between the sum type JsValue and JsBinarystatic Prism<JsValue,java.lang.Boolean>JsBool. prismprism between the sum type JsValue and JsBoolstatic Prism<JsValue,java.lang.Double>JsDouble. prismprism between the sum type JsValue and JsDoublestatic Prism<JsValue,java.time.Instant>JsInstant. prismprism between the sum type JsValue and JsInstantstatic Prism<JsValue,java.lang.Integer>JsInt. prismprism between the sum type JsValue and JsIntstatic Prism<JsValue,java.lang.Long>JsLong. prismprism between the sum type JsValue and JsLongstatic Prism<JsValue,JsObj>JsObj. prismprism between the sum type JsValue and JsObjstatic Prism<JsValue,java.lang.String>JsStr. prismprism between the sum type JsValue and JsStrstatic Lens<JsPair,JsValue>JsPair. valueLenslens that focuses on the value of a pairMethods 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(java.lang.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.default JsValueJsValue. ifNothing(JsValue value)returns the specified default value if nothing or the same this objectdefault JsValueJsValue. ifNull(JsValue value)returns the specified default value if null or the same this objectJsValueJsArray. 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<java.lang.String,JsValue>JsObj. head()Returns a pair with an arbitrary key of this object and its associated element.java.util.Iterator<JsValue>JsArray. iterator()java.util.Iterator<io.vavr.Tuple2<java.lang.String,JsValue>>JsObj. iterator()Lens<JsArray,JsValue>JsOptics.JsArrayLenses. value(int index)lens that focus on the value located at an index in an arrayLens<JsArray,JsValue>JsOptics.JsArrayLenses. value(JsPath path)lens that focus on the value located at a path in an arrayLens<JsObj,JsValue>JsOptics.JsObjLenses. value(java.lang.String key)lens that focus on a value located at a key in an object.Lens<JsObj,JsValue>JsOptics.JsObjLenses. value(JsPath path)lens that focus on a value located at a path in an object.Methods in jsonvalues with parameters of type JsValue Modifier and Type Method Description JsArrayJsArray. append(JsValue e, JsValue... others)Adds one or more elements, starting from the first, to the back of this array.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 JsValueJsValue. ifNothing(JsValue value)returns the specified default value if nothing or the same this objectdefault JsValueJsValue. ifNull(JsValue value)returns the specified default value if null or the same this objectdefault 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(java.lang.String key, JsValue el)Returns a one-element immutable object.static JsObjJsObj. of(java.lang.String key1, JsValue el1, java.lang.String key2, JsValue el2)Returns a two-element immutable object.static JsObjJsObj. of(java.lang.String key1, JsValue el1, java.lang.String key2, JsValue el2, java.lang.String key3, JsValue el3)Returns a three-element immutable object.static JsObjJsObj. of(java.lang.String key1, JsValue el1, java.lang.String key2, JsValue el2, java.lang.String key3, JsValue el3, java.lang.String key4, JsValue el4)Returns a four-element immutable object.static JsObjJsObj. of(java.lang.String key1, JsValue el1, java.lang.String key2, JsValue el2, java.lang.String key3, JsValue el3, java.lang.String key4, JsValue el4, java.lang.String key5, JsValue el5)Returns a five-element immutable object.static JsObjJsObj. of(java.lang.String key1, JsValue el1, java.lang.String key2, JsValue el2, java.lang.String key3, JsValue el3, java.lang.String key4, JsValue el4, java.lang.String key5, JsValue el5, java.lang.String key6, JsValue el6)Returns a six-element immutable object.static JsObjJsObj. of(java.lang.String key1, JsValue el1, java.lang.String key2, JsValue el2, java.lang.String key3, JsValue el3, java.lang.String key4, JsValue el4, java.lang.String key5, JsValue el5, java.lang.String key6, JsValue el6, java.lang.String key7, JsValue el7)Returns a six-element immutable object.static JsObjJsObj. of(java.lang.String key1, JsValue el1, java.lang.String key2, JsValue el2, java.lang.String key3, JsValue el3, java.lang.String key4, JsValue el4, java.lang.String key5, JsValue el5, java.lang.String key6, JsValue el6, java.lang.String key7, JsValue el7, java.lang.String key8, JsValue el8)Returns a six-element immutable object.static JsObjJsObj. of(java.lang.String key1, JsValue el1, java.lang.String key2, JsValue el2, java.lang.String key3, JsValue el3, java.lang.String key4, JsValue el4, java.lang.String key5, JsValue el5, java.lang.String key6, JsValue el6, java.lang.String key7, JsValue el7, java.lang.String key8, JsValue el8, java.lang.String key9, JsValue el9)Returns a six-element immutable object.static JsObjJsObj. of(java.lang.String key1, JsValue el1, java.lang.String key2, JsValue el2, java.lang.String key3, JsValue el3, java.lang.String key4, JsValue el4, java.lang.String key5, JsValue el5, java.lang.String key6, JsValue el6, java.lang.String key7, JsValue el7, java.lang.String key8, JsValue el8, java.lang.String key9, JsValue el9, java.lang.String key10, JsValue el10)Returns a six-element immutable object.static JsObjJsObj. of(java.lang.String key1, JsValue el1, java.lang.String key2, JsValue el2, java.lang.String key3, JsValue el3, java.lang.String key4, JsValue el4, java.lang.String key5, JsValue el5, java.lang.String key6, JsValue el6, java.lang.String key7, JsValue el7, java.lang.String key8, JsValue el8, java.lang.String key9, JsValue el9, java.lang.String key10, JsValue el10, java.lang.String key11, JsValue el11)Returns a six-element immutable object.static JsObjJsObj. of(java.lang.String key1, JsValue el1, java.lang.String key2, JsValue el2, java.lang.String key3, JsValue el3, java.lang.String key4, JsValue el4, java.lang.String key5, JsValue el5, java.lang.String key6, JsValue el6, java.lang.String key7, JsValue el7, java.lang.String key8, JsValue el8, java.lang.String key9, JsValue el9, java.lang.String key10, JsValue el10, java.lang.String key11, JsValue el11, java.lang.String key12, JsValue el12)Returns a six-element immutable object.static JsObjJsObj. of(java.lang.String key1, JsValue el1, java.lang.String key2, JsValue el2, java.lang.String key3, JsValue el3, java.lang.String key4, JsValue el4, java.lang.String key5, JsValue el5, java.lang.String key6, JsValue el6, java.lang.String key7, JsValue el7, java.lang.String key8, JsValue el8, java.lang.String key9, JsValue el9, java.lang.String key10, JsValue el10, java.lang.String key11, JsValue el11, java.lang.String key12, JsValue el12, java.lang.String key13, JsValue el13)Returns a six-element immutable object.static JsObjJsObj. of(java.lang.String key1, JsValue el1, java.lang.String key2, JsValue el2, java.lang.String key3, JsValue el3, java.lang.String key4, JsValue el4, java.lang.String key5, JsValue el5, java.lang.String key6, JsValue el6, java.lang.String key7, JsValue el7, java.lang.String key8, JsValue el8, java.lang.String key9, JsValue el9, java.lang.String key10, JsValue el10, java.lang.String key11, JsValue el11, java.lang.String key12, JsValue el12, java.lang.String key13, JsValue el13, java.lang.String key14, JsValue el14)Returns a six-element immutable object.static JsObjJsObj. of(java.lang.String key1, JsValue el1, java.lang.String key2, JsValue el2, java.lang.String key3, JsValue el3, java.lang.String key4, JsValue el4, java.lang.String key5, JsValue el5, java.lang.String key6, JsValue el6, java.lang.String key7, JsValue el7, java.lang.String key8, JsValue el8, java.lang.String key9, JsValue el9, java.lang.String key10, JsValue el10, java.lang.String key11, JsValue el11, java.lang.String key12, JsValue el12, java.lang.String key13, JsValue el13, java.lang.String key14, JsValue el14, java.lang.String key15, JsValue el15)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(JsValue e, JsValue... others)Adds one or more elements, starting from the last, to the front of this array.JsArrayJsArray. set(int index, JsValue element)JsArrayJsArray. set(int index, JsValue value, JsValue padElement)JsArrayJsArray. set(JsPath path, JsValue element)JsArrayJsArray. set(JsPath path, JsValue value, JsValue padElement)JsObjJsObj. set(java.lang.String key, JsValue value)Inserts the element at the key in this json, replacing any existing element.JsObjJsObj. set(JsPath path, JsValue element)JsObjJsObj. set(JsPath path, JsValue value, JsValue padElement)default TJson. set(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.TJson. set(JsPath path, JsValue element, JsValue padElement)Inserts the element at the path in this json, replacing any existing element and filling with padElement empty 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 JsArrayJsArray. filterAllKeys(java.util.function.BiPredicate<? super JsPath,? super JsValue> filter)JsObjJsObj. filterAllKeys(java.util.function.BiPredicate<? super JsPath,? super JsValue> filter)TJson. filterAllKeys(java.util.function.BiPredicate<? super JsPath,? super JsValue> filter)Filters all the keys of this json, removing those that don't ifPredicateElse the predicate.JsArrayJsArray. filterKeys(java.util.function.BiPredicate<? super java.lang.String,? super JsValue> filter)JsObjJsObj. filterKeys(java.util.function.BiPredicate<? super java.lang.String,? super JsValue> filter)JsArrayJsArray. mapAllKeys(java.util.function.BiFunction<? super JsPath,? super JsValue,java.lang.String> fn)JsObjJsObj. mapAllKeys(java.util.function.BiFunction<? super JsPath,? super JsValue,java.lang.String> fn)TJson. mapAllKeys(java.util.function.BiFunction<? super JsPath,? super JsValue,java.lang.String> fn)Maps all the keys of this json.JsArrayJsArray. mapAllObjs(java.util.function.BiFunction<? super JsPath,? super JsObj,JsValue> fn)JsArrayJsArray. mapAllObjs(java.util.function.Function<? super JsObj,JsValue> fn)JsObjJsObj. mapAllObjs(java.util.function.BiFunction<? super JsPath,? super JsObj,JsValue> fn)JsObjJsObj. mapAllObjs(java.util.function.Function<? super JsObj,JsValue> fn)TJson. mapAllObjs(java.util.function.BiFunction<? super JsPath,? super JsObj,JsValue> fn)Maps all the jsons of this json.TJson. mapAllObjs(java.util.function.Function<? super JsObj,JsValue> fn)Maps all the jsons of this json.JsArrayJsArray. mapAllValues(java.util.function.BiFunction<? super JsPath,? super JsPrimitive,? extends JsValue> fn)JsArrayJsArray. mapAllValues(java.util.function.Function<? super JsPrimitive,? extends JsValue> fn)JsObjJsObj. mapAllValues(java.util.function.BiFunction<? super JsPath,? super JsPrimitive,? extends JsValue> fn)JsObjJsObj. mapAllValues(java.util.function.Function<? super JsPrimitive,? extends JsValue> fn)TJson. mapAllValues(java.util.function.BiFunction<? super JsPath,? super JsPrimitive,? extends JsValue> fn)Maps all the values of this json.TJson. mapAllValues(java.util.function.Function<? super JsPrimitive,? extends JsValue> fn)Maps all the values of this json.JsArrayJsArray. mapKeys(java.util.function.BiFunction<? super java.lang.String,? super JsValue,java.lang.String> fn)JsObjJsObj. mapKeys(java.util.function.BiFunction<? super java.lang.String,? super JsValue,java.lang.String> fn)JsArrayJsArray. mapObjs(java.util.function.BiFunction<? super java.lang.Integer,? super JsObj,JsValue> fn)JsArrayJsArray. mapObjs(java.util.function.Function<? super JsObj,JsValue> fn)JsObjJsObj. mapObjs(java.util.function.BiFunction<? super java.lang.String,? super JsObj,JsValue> fn)JsObjJsObj. mapObjs(java.util.function.Function<? super JsObj,JsValue> fn)TJson. mapObjs(java.util.function.Function<? super JsObj,JsValue> fn)Maps the jsons in the first level of this json.JsArrayJsArray. mapValues(java.util.function.BiFunction<? super java.lang.Integer,? super JsPrimitive,? extends JsValue> fn)JsArrayJsArray. mapValues(java.util.function.Function<? super JsPrimitive,? extends JsValue> fn)JsObjJsObj. mapValues(java.util.function.BiFunction<? super java.lang.String,? super JsPrimitive,? extends JsValue> fn)JsObjJsObj. mapValues(java.util.function.Function<? super JsPrimitive,? extends JsValue> fn)TJson. mapValues(java.util.function.Function<? super JsPrimitive,? extends JsValue> fn)Maps the values in the first level of this json.static JsArrayJsArray. ofIterable(java.lang.Iterable<? extends JsValue> iterable)returns an immutable json array from an iterable of json elementsstatic JsObjJsObj. ofIterable(java.lang.Iterable<java.util.Map.Entry<java.lang.String,JsValue>> xs) -
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>Methods in jsonvalues.gen with type parameters of type JsValue Modifier and Type Method Description default <T extends JsValue>
JsGen<T>JsGen. flatMap(java.util.function.Function<R,JsGen<T>> f)Creates a new generator that passes the result of this generator into the given function `f`.default <T extends JsValue>
JsGen<T>JsGen. map(java.util.function.Function<R,T> f)Returns this generator but with the values transformed by the given map functionstatic <O extends JsValue>
JsGen<O>JsGens. oneOf(java.util.List<O> list)Creates a generator that randomly chooses a value from the given liststatic <O extends JsValue>
voidTestProperty. test(JsGen<O> gen, java.util.function.Predicate<O> condition, int times, java.util.function.Consumer<O> errorConsumer)static <O extends JsValue>
voidTestProperty. test(JsGen<O> gen, java.util.function.Predicate<O> condition, int times, java.util.function.Consumer<O> errorConsumer, java.util.Random random)static <O extends JsValue>
voidTestProperty. test(JsGen<O> gen, java.util.function.Predicate<O> condition, java.util.function.Consumer<O> errorConsumer)static <O extends JsValue>
voidTestProperty. test(JsGen<O> gen, java.util.function.Predicate<O> condition, java.util.function.Consumer<O> errorConsumer, java.util.Random random)Methods in jsonvalues.gen that return types with arguments of type JsValue Modifier and Type Method Description static JsGen<JsValue>JsGens. cons(JsValue value)generates a constantstatic JsGen<JsValue>JsGens. oneOf(JsValue a, JsValue... others)Creates a generator that randomly chooses a value from the given as parametersstatic JsGen<JsValue>JsGens. single(JsValue value)lift a constant value up into a generatorMethods in jsonvalues.gen with parameters of type JsValue Modifier and Type Method Description static JsGen<JsValue>JsGens. cons(JsValue value)generates a constantstatic JsGen<JsValue>JsGens. oneOf(JsValue a, JsValue... others)Creates a generator that randomly chooses a value from the given as parametersstatic JsGen<JsValue>JsGens. single(JsValue value)lift a constant value up into a generator -
Uses of JsValue in jsonvalues.spec
Fields in jsonvalues.spec declared as JsValue Modifier and Type Field Description JsValueError. valueMethods in jsonvalues.spec with type parameters of type JsValue Modifier and Type Method Description static <O extends JsValue>
JsSpecJsSpecs. oneOf(java.util.List<O> cons)Methods in jsonvalues.spec with parameters of type JsValue Modifier and Type Method Description static JsSpecJsSpecs. cons(JsValue value)a required and non nullable spec that specifies a constantjava.util.Set<JsErrorPair>JsArrayOfJsObjSpec. test(JsPath parentPath, JsValue value)java.util.Set<JsErrorPair>JsObjSpec. test(JsPath parentPath, JsValue value)java.util.Set<JsErrorPair>JsSpec. test(JsPath parentPath, JsValue value)verify if the given value satisfy this spec.java.util.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(java.util.function.Predicate<JsValue> predicate)returns a spec that conforms any value that is evaluated to true on the predicate.static JsArraySpecJsSpecs. array(java.util.function.Predicate<JsValue> predicate)non-nullable array, where each element of the array satisfies the given predicateConstructors in jsonvalues.spec with parameters of type JsValue Constructor Description Error(JsValue value, ERROR_CODE code)
-