Uses of Class
jsonvalues.JsObj
-
Packages that use JsObj Package Description 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. -
-
Uses of JsObj in com.dslplatform.json.serializers
Classes in com.dslplatform.json.serializers with type parameters of type JsObj Modifier and Type Class Description class
JsObjSerializer<T extends JsObj>
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. 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(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(JsPath path, Function<? super JsValue,? extends JsValue> fn)
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 default Optional<JsObj>
Json. getObj(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.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.
-