JsonOps

zio.json.ast.package$.JsonOps
final implicit class JsonOps(json: Json) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

Concise view

Value members

Concrete methods

def deepMerge(that: Json, mergeMode: MergeMode): Json

Perform a deep merge of this JSON value with another JSON value.

Perform a deep merge of this JSON value with another JSON value.

Objects are merged by key, values from the argument JSON take precedence over values from this JSON. Nested objects are recursed.

Null, Boolean, String and Number are treated as values, and values from the argument JSON completely replace values from this JSON.

mergeMode controls the behavior when merging two arrays within JSON. The Default mode treats Array as value, similar to Null, Boolean, String or Number above. The Index mode will replace the elements in this JSON array with the elements in the argument JSON at corresponding position. The Concat mode will concatenate the elements in this JSON array and the argument JSON array.

Attributes

def findAllByKey(name: String): Chunk[Json]