Uses of Class
jsonvalues.JsObj
-
Packages that use JsObj Package Description com.dslplatform.json the library dsl-json has been extended with some customization.com.dslplatform.json.parsers com.dslplatform.json.serializers 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.gen.state jsonvalues.spec -
-
Uses of JsObj in com.dslplatform.json
Methods in com.dslplatform.json that return JsObj Modifier and Type Method Description JsObj
MyDslJson. parseToJsObj(byte[] bytes, JsSpecParser parser)
JsObj
MyDslJson. parseToJsObj(InputStream is, JsSpecParser parser)
-
Uses of JsObj in com.dslplatform.json.parsers
Method parameters in com.dslplatform.json.parsers with type arguments of type JsObj Modifier and Type Method Description JsSpecParser
JsSpecParsers. ofArrayOfObjEachSuchThat(Function<JsObj,Optional<Error>> p, boolean nullable)
JsSpecParser
JsSpecParsers. ofObjSuchThat(Function<JsObj,Optional<Error>> predicate, boolean nullable)
-
Uses of JsObj in com.dslplatform.json.serializers
Methods in com.dslplatform.json.serializers with parameters of type JsObj Modifier and Type Method Description void
JsObjSerializer. write(com.dslplatform.json.JsonWriter sw, JsObj value)
Method parameters in com.dslplatform.json.serializers with type arguments of type JsObj Modifier and Type Method Description void
JsValueSerializer. setObjectSerializer(com.dslplatform.json.JsonWriter.WriteObject<JsObj> objectSerializer)
-
Uses of JsObj in jsonvalues
Fields in jsonvalues declared as JsObj Modifier and Type Field Description static JsObj
JsObj. EMPTY
Methods in jsonvalues that return JsObj Modifier and Type Method Description JsObj
JsObj. append(JsPath path, JsValue elem)
JsObj
JsObj. appendAll(JsPath path, JsArray elems)
static JsObj
JsObj. empty()
JsObj
JsObj. filterAllKeys(Predicate<? super JsPair> filter)
JsObj
JsObj. filterAllObjs(BiPredicate<? super JsPath,? super JsObj> filter)
JsObj
JsObj. filterAllValues(Predicate<? super JsPair> filter)
JsObj
JsObj. filterKeys(Predicate<? super JsPair> filter)
JsObj
JsObj. filterObjs(BiPredicate<? super JsPath,? super JsObj> filter)
JsObj
JsObj. filterValues(Predicate<? super JsPair> filter)
JsObj
JsObj. getObj(String key)
Returns the json object located at the given key or null if it doesn't exist or it's not an object.default JsObj
Json. getObj(JsPath path)
Returns the object located at the given path or null if it doesn't exist or it's not an object.JsObj
JsObj. intersection(JsObj that, JsArray.TYPE ARRAY_AS)
this.intersection(that, SET)
returns an array with the elements that exist in boththis
andthat
this.intersection(that, MULTISET)
returns an array with the elements that exist in boththis
andthat
, being duplicates allowed.JsObj
JsObj. intersectionAll(JsObj that, JsArray.TYPE ARRAY_AS)
this.intersectionAll(that)
behaves asthis.intersection(that, LIST)
, but for those elements that are containers of the same type and are located at the same position, the result is their intersection.JsObj
JsObj. mapAllKeys(Function<? super JsPair,String> fn)
JsObj
JsObj. mapAllKeys(Function<? super JsPair,String> fn, Predicate<? super JsPair> predicate)
JsObj
JsObj. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
JsObj
JsObj. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
JsObj
JsObj. mapAllValues(Function<? super JsPair,? extends JsValue> fn)
JsObj
JsObj. mapAllValues(Function<? super JsPair,? extends JsValue> fn, Predicate<? super JsPair> predicate)
JsObj
JsObj. mapKeys(Function<? super JsPair,String> fn)
JsObj
JsObj. mapKeys(Function<? super JsPair,String> fn, Predicate<? super JsPair> predicate)
JsObj
JsObj. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
JsObj
JsObj. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
JsObj
JsObj. mapValues(Function<? super JsPair,? extends JsValue> fn)
JsObj
JsObj. mapValues(Function<? super JsPair,? extends JsValue> fn, Predicate<? super JsPair> predicate)
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 JsObj
JsObj. of(JsPair pair, JsPair... others)
Returns an immutable object from one or more pairs.static JsObj
JsObj. ofIterable(Iterable<Map.Entry<String,JsValue>> xs)
static JsObj
JsObj. parse(String str)
Tries to parse the string into an immutable object.static JsObj
JsObj. parse(String str, ParseBuilder builder)
Tries to parse the string into an immutable object, performing the specified transformations during the parsing.JsObj
JsObj. prepend(JsPath path, JsValue elem)
JsObj
JsObj. prependAll(JsPath path, JsArray elems)
JsObj
JsObj. put(String key, boolean value)
Inserts the boolean at the key in this json, replacing any existing element.JsObj
JsObj. put(String key, int value)
Inserts the integer number at the key in this json, replacing any existing element.JsObj
JsObj. put(String key, long value)
Inserts the long number at the key in this json, replacing any existing element.JsObj
JsObj. put(String key, String value)
Inserts the string at the key in this json, replacing any existing element.JsObj
JsObj. put(String key, BigDecimal value)
Inserts the big decimal number at the key in this json, replacing any existing element.JsObj
JsObj. put(String key, BigInteger value)
Inserts the big integer number at the key in this json, replacing any existing element.JsObj
JsObj. 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 elementJsObj
JsObj. put(String key, JsArray value)
Inserts the array at the key in this json, replacing any existing element.JsObj
JsObj. put(String key, JsObj value)
Inserts the object at the key in this json, replacing any existing element.JsObj
JsObj. put(String key, JsValue value)
Inserts the element at the key in this json, replacing any existing element.JsObj
JsObj. put(JsPath path, Function<? super JsValue,? extends JsValue> fn)
JsObj
JsObj. putIfAbsent(String key, boolean bool)
Inserts at the given key in this json, if no element is present, the specified boolean.JsObj
JsObj. putIfAbsent(String key, double number)
Inserts at the given key in this json, if no element is present, the specified double number.JsObj
JsObj. putIfAbsent(String key, int number)
Inserts at the given key in this json, if no element is present, the specified integer.JsObj
JsObj. putIfAbsent(String key, long number)
Inserts at the given key in this json, if no element is present, the specified long number.JsObj
JsObj. putIfAbsent(String key, String str)
Inserts at the given key in this json, if no element is present, the specified string.JsObj
JsObj. 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.JsObj
JsObj. putIfAbsent(String key, JsArray array)
Inserts at the given key in this json, if no element is present, the specified array.JsObj
JsObj. putIfAbsent(String key, JsObj obj)
Inserts at the given key in this json, if no element is present, the specified obj.JsObj
JsObj. putIfPresent(String key, boolean bool)
Inserts at the given key in this json, if some element is present, the specified boolean.JsObj
JsObj. putIfPresent(String key, double number)
Inserts at the given key in this json, if some element is present, the specified double number.JsObj
JsObj. putIfPresent(String key, int number)
Inserts at the given key in this json, if some element is present, the specified integer number.JsObj
JsObj. putIfPresent(String key, long number)
Inserts at the given key in this json, if some element is present, the specified long number.JsObj
JsObj. putIfPresent(String key, String str)
Inserts at the given key in this json, if some element is present, the specified string.JsObj
JsObj. putIfPresent(String key, BigDecimal number)
Inserts at the given key in this json, if some element is present, the specified big decimal number.JsObj
JsObj. putIfPresent(String key, BigInteger number)
Inserts at the given key in this json, if some element is present, the specified big integer number.JsObj
JsObj. 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.JsObj
JsObj. putIfPresent(String key, JsArray array)
Inserts at the given key in this json, if some element is present, the specified array.JsObj
JsObj. putIfPresent(String key, JsObj obj)
Inserts at the given key in this json, if some element is present, the specified obj.JsObj
JsObj. putNull(String key)
JsObj
JsObj. remove(JsPath path)
JsObj
JsObj. tail()
Returns a new object with all the entries of this json object except the one with the given key.default JsObj
JsValue. toJsObj()
JsObj
JsObj. union(JsObj that)
returnsthis
json object plus those pairs from the given json objectthat
which keys don't exist inthis
.JsObj
JsObj. unionAll(JsObj that, JsArray.TYPE ARRAY_AS)
behaves like theunion(JsObj)
but, for those keys that exit in boththis
andthat
json objects, which associated elements are **containers of the same type**, the result is their union.Methods in jsonvalues that return types with arguments of type JsObj Modifier and Type Method Description Optional<JsObj>
JsObj. getOptObj(String key)
Returns the json object located at the given key orOptional.empty()
if it doesn't exist or it's not an object.default Optional<JsObj>
Json. getOptObj(JsPath path)
Returns the object located at the given path orOptional.empty()
if it doesn't exist or it's not an object.Methods in jsonvalues with parameters of type JsObj Modifier and Type Method Description boolean
JsObj. equals(JsObj that, JsArray.TYPE ARRAY_AS)
return true if this obj is equal to the given as a parameter.JsObj
JsObj. intersection(JsObj that, JsArray.TYPE ARRAY_AS)
this.intersection(that, SET)
returns an array with the elements that exist in boththis
andthat
this.intersection(that, MULTISET)
returns an array with the elements that exist in boththis
andthat
, being duplicates allowed.JsObj
JsObj. intersectionAll(JsObj that, JsArray.TYPE ARRAY_AS)
this.intersectionAll(that)
behaves asthis.intersection(that, LIST)
, but for those elements that are containers of the same type and are located at the same position, the result is their intersection.JsObj
JsObj. put(String key, JsObj value)
Inserts the object at the key in this json, replacing any existing element.JsObj
JsObj. putIfAbsent(String key, JsObj obj)
Inserts at the given key in this json, if no element is present, the specified obj.default T
Json. putIfAbsent(JsPath path, JsObj obj)
Inserts at the given path in this json, if no element is present, the specified object, replacing any existing element in the path and filling withJsNull
empty positions in arrays when necessary.JsObj
JsObj. putIfPresent(String key, JsObj obj)
Inserts at the given key in this json, if some element is present, the specified obj.default T
Json. putIfPresent(JsPath path, JsObj obj)
Inserts at the given path in this json, if some element is present, the specified integer.boolean
JsObj. same(JsObj obj)
JsObj
JsObj. union(JsObj that)
returnsthis
json object plus those pairs from the given json objectthat
which keys don't exist inthis
.JsObj
JsObj. unionAll(JsObj that, JsArray.TYPE ARRAY_AS)
behaves like theunion(JsObj)
but, for those keys that exit in boththis
andthat
json objects, which associated elements are **containers of the same type**, the result is their union.Method parameters in jsonvalues with type arguments of type JsObj Modifier and Type Method Description JsArray
JsArray. filterAllObjs(BiPredicate<? super JsPath,? super JsObj> filter)
JsObj
JsObj. filterAllObjs(BiPredicate<? super JsPath,? super JsObj> filter)
T
Json. filterAllObjs(BiPredicate<? super JsPath,? super JsObj> filter)
Filters all the pair of jsons of this json, removing those that don't ifPredicateElse the predicate.JsArray
JsArray. filterObjs(BiPredicate<? super JsPath,? super JsObj> filter)
JsObj
JsObj. filterObjs(BiPredicate<? super JsPath,? super JsObj> filter)
T
Json. filterObjs(BiPredicate<? super JsPath,? super JsObj> filter)
Filters the pair of jsons in the first level of this json, removing those that don't ifPredicateElse the predicate.<T> T
JsPair. ifJsonElse(BiFunction<JsPath,JsObj,T> ifJsOb, BiFunction<JsPath,JsArray,T> ifJsArr, BiFunction<JsPath,JsValue,T> ifNotJson)
Declarative way of implementing an if(obj)return T; else if(array) return T; else return T; where T is computed by the given functionsstatic <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. ifObjElse(Function<? super JsObj,T> ifObj, Function<? super JsValue,T> ifNotObj)
return a matching expression to extract json objects out of json elements.default boolean
JsValue. isObj(Predicate<JsObj> predicate)
Returns true if this elem is a JsObj and satisfies the given predicateJsArray
JsArray. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
JsArray
JsArray. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
JsArray
JsArray. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
JsArray
JsArray. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
JsArray
JsArray. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
JsObj
JsObj. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
JsObj
JsObj. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
JsObj
JsObj. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
JsObj
JsObj. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
JsObj
JsObj. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
T
Json. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
Maps all the jsons of this json.T
Json. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
Maps all the jsons of this json.T
Json. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
Maps all the jsons of this json that satisfies a given predicate.T
Json. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
Maps all the jsons of this json that satisfies a given predicate.T
Json. mapAllObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
Maps all the jsons of this json that satisfies a given predicate.JsArray
JsArray. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
JsArray
JsArray. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
JsArray
JsArray. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
JsArray
JsArray. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
JsArray
JsArray. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
JsObj
JsObj. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
JsObj
JsObj. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
JsObj
JsObj. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
JsObj
JsObj. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
JsObj
JsObj. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
T
Json. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
Maps the jsons in the first level of this json.T
Json. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn)
Maps the jsons in the first level of this json.T
Json. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
Maps the jsons in the first level of this json that satisfies a given predicate.T
Json. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
Maps the jsons in the first level of this json that satisfies a given predicate.T
Json. mapObjs(BiFunction<? super JsPath,? super JsObj,JsObj> fn, BiPredicate<? super JsPath,? super JsObj> predicate)
Maps the jsons in the first level of this json that satisfies a given predicate. -
Uses of JsObj in jsonvalues.console
Methods in jsonvalues.console that return JsObj Modifier and Type Method Description JsObj
JsObjIO. exec()
Methods in jsonvalues.console that return types with arguments of type JsObj Modifier and Type Method Description JsFuture<JsObj>
JsObjIO. apply(JsPath path)
-
Uses of JsObj in jsonvalues.future
Methods in jsonvalues.future that return types with arguments of type JsObj Modifier and Type Method Description CompletableFuture<JsObj>
JsObjFuture. get()
it triggers the execution of all the completable futures, combining the results into a JsObj -
Uses of JsObj in jsonvalues.gen
Methods in jsonvalues.gen that return types with arguments of type JsObj Modifier and Type Method Description Supplier<JsObj>
JsObjGen. apply(Random random)
-
Uses of JsObj in jsonvalues.gen.state
Methods in jsonvalues.gen.state that return types with arguments of type JsObj Modifier and Type Method Description JsGen<JsObj>
JsObjStateGen. apply(JsObj current)
Methods in jsonvalues.gen.state with parameters of type JsObj Modifier and Type Method Description JsGen<JsObj>
JsObjStateGen. apply(JsObj current)
Method parameters in jsonvalues.gen.state with type arguments of type JsObj Modifier and Type Method Description static JsStateGen
JsStateGens. ifElse(Predicate<JsObj> condition, JsGen<?> ifTrue, JsGen<?> ifFalse)
-
Uses of JsObj in jsonvalues.spec
Methods in jsonvalues.spec that return JsObj Modifier and Type Method Description JsObj
JsObjParser. parse(byte[] bytes)
parses an array of bytes into a Json object that must conform the spec of the parser.JsObj
JsObjParser. parse(InputStream inputstream)
parses an input stream of bytes into a Json object that must conform the spec of the parser.JsObj
JsObjParser. parse(String str)
parses a string into a Json object that must conform the spec of the parser.Methods in jsonvalues.spec with parameters of type JsObj Modifier and Type Method Description Set<JsErrorPair>
JsObjSpec. test(JsObj obj)
Method parameters in jsonvalues.spec with type arguments of type JsObj Modifier and Type Method Description static JsArraySpec
JsSpecs. arrayOfObj(Predicate<JsObj> predicate)
non-nullable array of objects, where each element of the array satisfies the given predicatestatic JsSpec
JsSpecs. obj(Predicate<JsObj> predicate)
non-nullable json object that satisfies the given predicate
-