object MutateInSpec
Methods to allow constructing a sequence of MutateInSpec
s.
- Alphabetic
- By Inheritance
- MutateInSpec
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def arrayAddUnique[T](path: String, value: T)(implicit serializer: JsonSerializer[T]): ArrayAddUnique
Returns a
MutateInSpec
with the intent of inserting a value into an existing JSON array, but only if the value is not already contained in the array (by way of string comparison).Returns a
MutateInSpec
with the intent of inserting a value into an existing JSON array, but only if the value is not already contained in the array (by way of string comparison).Will error if the last element of the path does not exist or is not an array.
- path
the path identifying an array to which to append the value, and an index. E.g. "foo.bar[3]"
- value
the value to insert. this can be of any type for which an implicit JsonSerializer can be found: a list of types that are supported 'out of the box' is available at these JSON docs
- def arrayAppend[T](path: String, values: Seq[T])(implicit serializer: JsonSerializer[T]): ArrayAppend
Returns a
MutateInSpec
with the intent of appending a value to an existing JSON array.Returns a
MutateInSpec
with the intent of appending a value to an existing JSON array.Will error if the last element of the path does not exist or is not an array.
- path
the path identifying an array to which to append the value.
- values
the values to append. this can be of any type for which an implicit JsonSerializer can be found: a list of types that are supported 'out of the box' is available at these JSON docs
- serializer
an implicit JsonSerializer. For any supported type T this will be found automatically.
- def arrayInsert[T](path: String, values: Seq[T])(implicit serializer: JsonSerializer[T]): ArrayInsert
Returns a
MutateInSpec
with the intent of inserting a value into an existing JSON array.Returns a
MutateInSpec
with the intent of inserting a value into an existing JSON array.Will error if the last element of the path does not exist or is not an array.
- path
the path identifying an array to which to append the value, and an index. E.g. "foo.bar[3]"
- values
the value(s) to insert. this can be of any type for which an implicit JsonSerializer can be found: a list of types that are supported 'out of the box' is available at these JSON docs
- serializer
an implicit JsonSerializer. For any supported type T this will be found automatically.
- def arrayPrepend[T](path: String, values: Seq[T])(implicit serializer: JsonSerializer[T]): ArrayPrepend
Returns a
MutateInSpec
with the intent of prepending a value to an existing JSON array.Returns a
MutateInSpec
with the intent of prepending a value to an existing JSON array.Will error if the last element of the path does not exist or is not an array.
- path
the path identifying an array to which to prepend the value.
- values
the value(s) to prepend. this can be of any type for which an implicit JsonSerializer can be found: a list of types that are supported 'out of the box' is available at these JSON docs
- serializer
an implicit JsonSerializer. For any supported type T this will be found automatically.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- def decrement(path: String, delta: Long): Increment
Returns a
MutateInSpec
with the intent of decrementing a numerical field in a JSON object.Returns a
MutateInSpec
with the intent of decrementing a numerical field in a JSON object.If the field does not exist then it is created and takes the value of
delta
* -1.- path
the path identifying a numerical field to adjust or create.
- delta
the value to decrement the field by.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def increment(path: String, delta: Long): Increment
Returns a
MutateInSpec
with the intent of incrementing a numerical field in a JSON object.Returns a
MutateInSpec
with the intent of incrementing a numerical field in a JSON object.If the field does not exist then it is created and takes the value of
delta
.- path
the path identifying a numerical field to adjust or create.
- delta
the value to increment the field by.
- def insert[T](path: String, value: T)(implicit serializer: JsonSerializer[T]): Insert
Returns a
MutateInSpec
with the intent of inserting a value into a JSON object.Returns a
MutateInSpec
with the intent of inserting a value into a JSON object.Will error if the last element of the path already exists.
- path
the path identifying where to insert the value.
- value
the value to insert. this can be of any type for which an implicit JsonSerializer can be found: a list of types that are supported 'out of the box' is available at these JSON docs
- serializer
an implicit JsonSerializer. For any supported type T this will be found automatically.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def remove(path: String): Remove
Returns a
MutateInSpec
with the intent of removing a value from a JSON object.Returns a
MutateInSpec
with the intent of removing a value from a JSON object.Will error if the last element of the path does not exist.
- path
the path to be removed.
- def replace[T](path: String, value: T)(implicit serializer: JsonSerializer[T]): Replace
Returns a
MutateInSpec
with the intent of replacing an existing value in a JSON object.Returns a
MutateInSpec
with the intent of replacing an existing value in a JSON object.If the path is an empty string (""), the value replace the entire contents of the document.
Will error if the last element of the path does not exist.
- path
the path identifying where to replace the value.
- value
the value to replace. this can be of any type for which an implicit JsonSerializer can be found: a list of types that are supported 'out of the box' is available at these JSON docs
- serializer
an implicit JsonSerializer. For any supported type T this will be found automatically.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def upsert[T](path: String, value: T)(implicit serializer: JsonSerializer[T]): Upsert
Returns a
MutateInSpec
with the intent of upserting a value into a JSON object.Returns a
MutateInSpec
with the intent of upserting a value into a JSON object.That is, the value will be replaced if the path already exists, or inserted if not.
- path
the path identifying where to upsert the value.
- value
the value to upsert. this can be of any type for which an implicit JsonSerializer can be found: a list of types that are supported 'out of the box' is available at these JSON docs
- serializer
an implicit JsonSerializer. For any supported type T this will be found automatically.
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)