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.console jsonvalues.future jsonvalues.gen jsonvalues.spec jsonvalues.supplier -
-
Uses of JsValue in com.dslplatform.json.parsers
Methods in com.dslplatform.json.parsers that return JsValue Modifier and Type Method Description JsValue
JsArraySpecParser. nullOrArray(com.dslplatform.json.JsonReader<?> reader)
JsValue
JsSpecParser. parse(com.dslplatform.json.JsonReader<?> reader)
Method parameters in com.dslplatform.json.parsers with type arguments of type JsValue Modifier and Type Method Description JsSpecParser
JsSpecParsers. ofArrayOfValueEachSuchThat(Function<JsValue,Optional<Error>> p, boolean nullable)
JsSpecParser
JsSpecParsers. ofValueSuchThat(Function<JsValue,Optional<Error>> predicate)
-
Uses of JsValue in jsonvalues
Subinterfaces of JsValue in jsonvalues 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.Classes in jsonvalues that implement JsValue Modifier and Type Class Description class
JsArray
Represents a json array, which is an ordered list of elements.class
JsBigDec
Represents an immutable json number of type BigDecimal.class
JsBigInt
Represents an immutable json number of type BigInteger.class
JsBool
Represents an immutable json boolean.class
JsDouble
Represents an immutable json number of type double.class
JsInt
Represents an immutable json number of type integer.class
JsLong
Represents an immutable json number of type long.class
JsNothing
It's a special json element that represents 'nothing'.class
JsNull
Represents null, which a valid json value.class
JsNumber
Represents an immutable json number.class
JsObj
Represents a json object, which is an unordered set of name/element pairs.class
JsStr
Represents an immutable json string.Fields in jsonvalues declared as JsValue Modifier and Type Field Description JsValue
JsPair. value
the json value.Fields in jsonvalues with type parameters of type JsValue Modifier and Type Field Description static Prism<JsValue,JsArray>
JsArray. prism
prism between the sum type JsValue and JsArraystatic Prism<JsValue,BigDecimal>
JsBigDec. prism
prism between the sum type JsValue and JsBigDecstatic Prism<JsValue,BigInteger>
JsBigInt. prism
static Prism<JsValue,Boolean>
JsBool. prism
prism between the sum type JsValue and JsBoolstatic Prism<JsValue,Double>
JsDouble. prism
prism between the sum type JsValue and JsDoublestatic Prism<JsValue,Integer>
JsInt. prism
prism between the sum type JsValue and JsIntstatic Prism<JsValue,Long>
JsLong. prism
prism between the sum type JsValue and JsLongstatic Prism<JsValue,JsObj>
JsObj. prism
prism between the sum type JsValue and JsObjstatic Prism<JsValue,String>
JsStr. prism
prism between the sum type JsValue and JsStrstatic Lens<JsPair,JsValue>
JsPair. valueLens
lens that focuses on the value of a pairMethods in jsonvalues that return JsValue Modifier and Type Method Description JsValue
JsArray. get(int i)
returns the element located at the specified index or JsNothing if it doesn't exist.JsValue
JsArray. get(JsPath path)
JsValue
JsObj. get(String key)
JsValue
JsObj. get(JsPath path)
JsValue
Json. get(JsPath path)
Returns the element located at the given path orJsNothing
if it doesn't exist.JsValue
JsArray. head()
Returns the first element of this array.default JsValue
JsValue. ifNothing(JsValue value)
returns the specified default value if nothing or the same this objectdefault JsValue
JsValue. ifNull(JsValue value)
returns the specified default value if null or the same this objectJsValue
JsArray. 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.Iterator<JsValue>
JsArray. iterator()
Iterator<io.vavr.Tuple2<String,JsValue>>
JsObj. iterator()
Lens<JsArray,JsValue>
JsOptics.JsArrayLenses. value(JsPath path)
lens that focus on the value located at a path in an arrayMethods in jsonvalues with parameters of type JsValue Modifier and Type Method Description JsArray
JsArray. append(JsValue e, JsValue... others)
Adds one or more elements, starting from the first, to the back of this array.boolean
JsArray. containsValue(JsValue el)
boolean
JsObj. containsValue(JsValue el)
boolean
Json. containsValue(JsValue element)
Returns true if this json contains the given element in the first level.default boolean
Json. equals(JsValue elem, JsArray.TYPE ARRAY_AS)
default JsValue
JsValue. ifNothing(JsValue value)
returns the specified default value if nothing or the same this objectdefault JsValue
JsValue. ifNull(JsValue value)
returns the specified default value if null or the same this objectdefault boolean
JsValue. isSameType(JsValue that)
returns true if this elem and the given have the same typestatic JsArray
JsArray. of(JsValue e)
static JsArray
JsArray. of(JsValue e, JsValue e1)
Returns an immutable two-element array.static JsArray
JsArray. of(JsValue e, JsValue e1, JsValue e2)
Returns an immutable three-element array.static JsArray
JsArray. of(JsValue e, JsValue e1, JsValue e2, JsValue e3)
Returns an immutable four-element array.static JsArray
JsArray. of(JsValue e, JsValue e1, JsValue e2, JsValue e3, JsValue e4)
Returns an immutable five-element array.static JsArray
JsArray. of(JsValue e, JsValue e1, JsValue e2, JsValue e3, JsValue e4, JsValue... rest)
Returns an immutable array.static JsObj
JsObj. of(String key, JsValue el)
Returns a one-element immutable object.static JsObj
JsObj. of(String key1, JsValue el1, String key2, JsValue el2)
Returns a two-element immutable object.static JsObj
JsObj. of(String key1, JsValue el1, String key2, JsValue el2, String key3, JsValue el3)
Returns a three-element immutable object.static JsObj
JsObj. of(String key1, JsValue el1, String key2, JsValue el2, String key3, JsValue el3, String key4, JsValue el4)
Returns a four-element immutable object.static JsObj
JsObj. 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 JsObj
JsObj. 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 JsObj
JsObj. 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 JsObj
JsObj. 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 JsObj
JsObj. 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 JsObj
JsObj. 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 JsObj
JsObj. 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 JsObj
JsObj. 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 JsObj
JsObj. 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, String key13, JsValue el13)
Returns a six-element immutable object.static JsObj
JsObj. 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, String key13, JsValue el13, String key14, JsValue el14)
Returns a six-element immutable object.static JsObj
JsObj. 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, String key13, JsValue el13, String key14, JsValue el14, String key15, JsValue el15)
Returns a six-element immutable object.static JsPair
JsPair. of(JsPath path, JsValue elem)
Returns a json pair from the path and the json element.JsArray
JsArray. prepend(JsValue e, JsValue... others)
Adds one or more elements, starting from the last, to the front of this array.JsArray
JsArray. set(JsPath path, JsValue value)
JsObj
JsObj. set(String key, JsValue value)
Inserts the element at the key in this json, replacing any existing element.JsObj
JsObj. set(JsPath path, JsValue value)
T
Json. set(JsPath path, JsValue element)
Inserts the element at the path in this json, replacing any existing element and filling withJsNull
empty indexes in arrays when necessary.default long
Json. times(JsValue e)
default long
Json. timesAll(JsValue e)
Method parameters in jsonvalues with type arguments of type JsValue Modifier and Type Method Description JsArray
JsArray. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsValue> fn)
JsObj
JsObj. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsValue> fn)
T
Json. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsValue> fn)
Maps all the jsons of this json.JsArray
JsArray. mapAllValues(Function<? super JsPair,? extends JsValue> fn)
JsObj
JsObj. mapAllValues(Function<? super JsPair,? extends JsValue> fn)
T
Json. mapAllValues(Function<? super JsPair,? extends JsValue> fn)
Maps all the values of this json.JsArray
JsArray. mapObjs(BiFunction<? super JsPath,? super JsObj,JsValue> fn)
JsObj
JsObj. mapObjs(BiFunction<? super JsPath,? super JsObj,JsValue> fn)
T
Json. mapObjs(BiFunction<? super JsPath,? super JsObj,JsValue> fn)
Maps the jsons in the first level of this json.JsArray
JsArray. mapValues(Function<? super JsPair,? extends JsValue> fn)
JsObj
JsObj. mapValues(Function<? super JsPair,? extends JsValue> fn)
T
Json. mapValues(Function<? super JsPair,? extends JsValue> fn)
Maps the values in the first level of this json.static JsArray
JsArray. ofIterable(Iterable<? extends JsValue> iterable)
returns an immutable json array from an iterable of json elementsstatic JsObj
JsObj. ofIterable(Iterable<Map.Entry<String,JsValue>> xs)
-
Uses of JsValue in jsonvalues.console
Classes in jsonvalues.console with type parameters of type JsValue Modifier and Type Interface Description interface
JsConsole<T extends JsValue>
Represents a functional effect than when execute creates e JsValueMethods in jsonvalues.console that return types with arguments of type JsValue Modifier and Type Method Description static JsConsole<JsValue>
JsIOs. read(JsSpec spec)
-
Uses of JsValue in jsonvalues.future
Classes in jsonvalues.future with type parameters of type JsValue Modifier and Type Interface Description interface
JsFuture<T extends JsValue>
Represents a supplier of a completable future which result is a JsValue -
Uses of JsValue in jsonvalues.gen
Classes in jsonvalues.gen with type parameters of type JsValue Modifier and Type Interface Description interface
JsGen<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(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(Function<R,T> f)
Returns this generator but with the values transformed by the given map functionstatic <O extends JsValue>
JsGen<O>JsGens. oneOf(List<O> list)
Creates a generator that randomly chooses a value from the given listMethods 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)
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. 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 JsValue
Error. value
Methods in jsonvalues.spec with type parameters of type JsValue Modifier and Type Method Description static <O extends JsValue>
JsSpecJsSpecs. oneOf(List<O> cons)
Methods 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)
verify if the given value satisfy this spec.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 JsSpec
JsSpecs. any(Predicate<JsValue> predicate)
returns a spec that conforms any value that is evaluated to true on the predicate.static JsArraySpec
JsSpecs. array(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)
-
Uses of JsValue in jsonvalues.supplier
Method parameters in jsonvalues.supplier with type arguments of type JsValue Modifier and Type Method Description JsArraySupplier
JsArraySupplier. append(Supplier<? extends JsValue> future)
static JsObjSupplier
JsObjSupplier. of(String key, Supplier<? extends JsValue> supplier)
static factory method to create a JsObjSupplier of one mappingstatic JsObjSupplier
JsObjSupplier. of(String key1, Supplier<? extends JsValue> supplier1, String key2, Supplier<? extends JsValue> supplier2)
static factory method to create a JsObjSupplier of one mappingstatic JsObjSupplier
JsObjSupplier. of(String key1, Supplier<? extends JsValue> supplier1, String key2, Supplier<? extends JsValue> supplier2, String key3, Supplier<? extends JsValue> supplier3)
static factory method to create a JsObjSupplier of three mappingsstatic JsObjSupplier
JsObjSupplier. of(String key1, Supplier<? extends JsValue> supplier1, String key2, Supplier<? extends JsValue> supplier2, String key3, Supplier<? extends JsValue> supplier3, String key4, Supplier<? extends JsValue> supplier4)
static factory method to create a JsObjSupplier of four mappingsstatic JsObjSupplier
JsObjSupplier. of(String key1, Supplier<? extends JsValue> supplier1, String key2, Supplier<? extends JsValue> supplier2, String key3, Supplier<? extends JsValue> supplier3, String key4, Supplier<? extends JsValue> supplier4, String key5, Supplier<? extends JsValue> supplier5)
static factory method to create a JsObjSupplier of five mappingsstatic JsObjSupplier
JsObjSupplier. of(String key1, Supplier<? extends JsValue> supplier1, String key2, Supplier<? extends JsValue> supplier2, String key3, Supplier<? extends JsValue> supplier3, String key4, Supplier<? extends JsValue> supplier4, String key5, Supplier<? extends JsValue> supplier5, String key6, Supplier<? extends JsValue> supplier6)
static factory method to create a JsObjSupplier of six mappingsstatic JsObjSupplier
JsObjSupplier. of(String key1, Supplier<? extends JsValue> supplier1, String key2, Supplier<? extends JsValue> supplier2, String key3, Supplier<? extends JsValue> supplier3, String key4, Supplier<? extends JsValue> supplier4, String key5, Supplier<? extends JsValue> supplier5, String key6, Supplier<? extends JsValue> supplier6, String key7, Supplier<? extends JsValue> supplier7)
static factory method to create a JsObjSupplier of seven mappingsstatic JsObjSupplier
JsObjSupplier. of(String key1, Supplier<? extends JsValue> supplier1, String key2, Supplier<? extends JsValue> supplier2, String key3, Supplier<? extends JsValue> supplier3, String key4, Supplier<? extends JsValue> supplier4, String key5, Supplier<? extends JsValue> supplier5, String key6, Supplier<? extends JsValue> supplier6, String key7, Supplier<? extends JsValue> supplier7, String key8, Supplier<? extends JsValue> supplier8)
static factory method to create a JsObjSupplier of eight mappingsstatic JsObjSupplier
JsObjSupplier. of(String key1, Supplier<? extends JsValue> supplier1, String key2, Supplier<? extends JsValue> supplier2, String key3, Supplier<? extends JsValue> supplier3, String key4, Supplier<? extends JsValue> supplier4, String key5, Supplier<? extends JsValue> supplier5, String key6, Supplier<? extends JsValue> supplier6, String key7, Supplier<? extends JsValue> supplier7, String key8, Supplier<? extends JsValue> supplier8, String key9, Supplier<? extends JsValue> supplier9)
static factory method to create a JsObjSupplier of nine mappingsstatic JsObjSupplier
JsObjSupplier. of(String key1, Supplier<? extends JsValue> supplier1, String key2, Supplier<? extends JsValue> supplier2, String key3, Supplier<? extends JsValue> supplier3, String key4, Supplier<? extends JsValue> supplier4, String key5, Supplier<? extends JsValue> supplier5, String key6, Supplier<? extends JsValue> supplier6, String key7, Supplier<? extends JsValue> supplier7, String key8, Supplier<? extends JsValue> supplier8, String key9, Supplier<? extends JsValue> supplier9, String key10, Supplier<? extends JsValue> supplier10)
static factory method to create a JsObjSupplier of ten mappingsstatic JsObjSupplier
JsObjSupplier. of(String key1, Supplier<? extends JsValue> supplier1, String key2, Supplier<? extends JsValue> supplier2, String key3, Supplier<? extends JsValue> supplier3, String key4, Supplier<? extends JsValue> supplier4, String key5, Supplier<? extends JsValue> supplier5, String key6, Supplier<? extends JsValue> supplier6, String key7, Supplier<? extends JsValue> supplier7, String key8, Supplier<? extends JsValue> supplier8, String key9, Supplier<? extends JsValue> supplier9, String key10, Supplier<? extends JsValue> supplier10, String key11, Supplier<? extends JsValue> supplier11)
static factory method to create a JsObjSupplier of eleven mappingsstatic JsObjSupplier
JsObjSupplier. of(String key1, Supplier<? extends JsValue> supplier1, String key2, Supplier<? extends JsValue> supplier2, String key3, Supplier<? extends JsValue> supplier3, String key4, Supplier<? extends JsValue> supplier4, String key5, Supplier<? extends JsValue> supplier5, String key6, Supplier<? extends JsValue> supplier6, String key7, Supplier<? extends JsValue> supplier7, String key8, Supplier<? extends JsValue> supplier8, String key9, Supplier<? extends JsValue> supplier9, String key10, Supplier<? extends JsValue> supplier10, String key11, Supplier<? extends JsValue> supplier11, String key12, Supplier<? extends JsValue> supplier12)
static factory method to create a JsObjSupplier of twelve mappingsstatic JsObjSupplier
JsObjSupplier. of(String key1, Supplier<? extends JsValue> supplier1, String key2, Supplier<? extends JsValue> supplier2, String key3, Supplier<? extends JsValue> supplier3, String key4, Supplier<? extends JsValue> supplier4, String key5, Supplier<? extends JsValue> supplier5, String key6, Supplier<? extends JsValue> supplier6, String key7, Supplier<? extends JsValue> supplier7, String key8, Supplier<? extends JsValue> supplier8, String key9, Supplier<? extends JsValue> supplier9, String key10, Supplier<? extends JsValue> supplier10, String key11, Supplier<? extends JsValue> supplier11, String key12, Supplier<? extends JsValue> supplier12, String key13, Supplier<? extends JsValue> supplier13)
static factory method to create a JsObjSupplier of thirteen mappingsstatic JsObjSupplier
JsObjSupplier. of(String key1, Supplier<? extends JsValue> supplier1, String key2, Supplier<? extends JsValue> supplier2, String key3, Supplier<? extends JsValue> supplier3, String key4, Supplier<? extends JsValue> supplier4, String key5, Supplier<? extends JsValue> supplier5, String key6, Supplier<? extends JsValue> supplier6, String key7, Supplier<? extends JsValue> supplier7, String key8, Supplier<? extends JsValue> supplier8, String key9, Supplier<? extends JsValue> supplier9, String key10, Supplier<? extends JsValue> supplier10, String key11, Supplier<? extends JsValue> supplier11, String key12, Supplier<? extends JsValue> supplier12, String key13, Supplier<? extends JsValue> supplier13, String key14, Supplier<? extends JsValue> supplier14)
static factory method to create a JsObjSupplier of fourteen mappingsstatic JsObjSupplier
JsObjSupplier. of(String key1, Supplier<? extends JsValue> supplier1, String key2, Supplier<? extends JsValue> supplier2, String key3, Supplier<? extends JsValue> supplier3, String key4, Supplier<? extends JsValue> supplier4, String key5, Supplier<? extends JsValue> supplier5, String key6, Supplier<? extends JsValue> supplier6, String key7, Supplier<? extends JsValue> supplier7, String key8, Supplier<? extends JsValue> supplier8, String key9, Supplier<? extends JsValue> supplier9, String key10, Supplier<? extends JsValue> supplier10, String key11, Supplier<? extends JsValue> supplier11, String key12, Supplier<? extends JsValue> supplier12, String key13, Supplier<? extends JsValue> supplier13, String key14, Supplier<? extends JsValue> supplier14, String key15, Supplier<? extends JsValue> supplier15)
static factory method to create a JsObjSupplier of fifteen mappingsJsObjSupplier
JsObjSupplier. set(String key, Supplier<? extends JsValue> supplier)
returns a new object supplier inserting the given supplier at the given keystatic JsArraySupplier
JsArraySupplier. tuple(Supplier<? extends JsValue> head, Supplier<? extends JsValue>... tail)
returns a JsArraySupplier from the given head and the tail
-