Json

zio.blocks.schema.json.Json
See theJson companion trait
object Json

Attributes

Companion
trait
Source
Json.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Json.type

Members list

Type members

Classlikes

final case class Array(value: Chunk[Json]) extends Json

Represents a JSON array.

Represents a JSON array.

Attributes

Companion
object
Source
Json.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Json
class Object
trait Matchable
class Any
Show all
object Array

Attributes

Companion
class
Source
Json.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Array.type
final case class Boolean(value: Boolean) extends Json

Represents a JSON boolean.

Represents a JSON boolean.

Attributes

Companion
object
Source
Json.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Json
class Object
trait Matchable
class Any
Show all
object Boolean

Attributes

Companion
class
Source
Json.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Boolean.type
case object Null extends Json

Represents JSON null.

Represents JSON null.

Attributes

Source
Json.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
trait Json
class Object
trait Matchable
class Any
Show all
Self type
Null.type
final case class Number(value: BigDecimal) extends Json

Represents a JSON number stored as a String to preserve exact representation.

Represents a JSON number stored as a String to preserve exact representation.

Attributes

Companion
object
Source
Json.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Json
class Object
trait Matchable
class Any
Show all
object Number

Attributes

Companion
class
Source
Json.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Number.type
final case class Object(value: Chunk[(String, Json)]) extends Json

Represents a JSON object with ordered key-value pairs. Equality is order-independent (compared as sorted key-value pairs).

Represents a JSON object with ordered key-value pairs. Equality is order-independent (compared as sorted key-value pairs).

Attributes

Companion
object
Source
Json.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Json
class Object
trait Matchable
class Any
Show all
object Object

Attributes

Companion
class
Source
Json.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Object.type
final case class String(value: String) extends Json

Represents a JSON string.

Represents a JSON string.

Attributes

Source
Json.scala
Supertypes
trait Serializable
trait Product
trait Equals
trait Json
class Object
trait Matchable
class Any
Show all

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def from[A](value: A)(implicit schema: Schema[A]): Json

Creates a Json value from an encoder.

Creates a Json value from an encoder.

Attributes

Source
Json.scala

Converts a DynamicValue to a Json value.

Converts a DynamicValue to a Json value.

Attributes

Source
Json.scala
def fromKV(kvs: Seq[(DynamicOptic, Json)]): Either[SchemaError, Json]

Reconstructs a JSON value from path-value pairs. Returns Left if the paths are inconsistent.

Reconstructs a JSON value from path-value pairs. Returns Left if the paths are inconsistent.

Attributes

Source
Json.scala
def fromKVUnsafe(kvs: Seq[(DynamicOptic, Json)]): Json

Reconstructs a JSON value from path-value pairs. Throws on inconsistent paths.

Reconstructs a JSON value from path-value pairs. Throws on inconsistent paths.

Attributes

Source
Json.scala
def parse(input: String): Either[SchemaError, Json]

Parses a JSON string into a Json value.

Parses a JSON string into a Json value.

Attributes

Source
Json.scala
def parse(input: Array[Byte]): Either[SchemaError, Json]

Parses a JSON byte array into a Json value.

Parses a JSON byte array into a Json value.

Attributes

Source
Json.scala
def parse(input: Array[Byte], config: ReaderConfig): Either[SchemaError, Json]

Parses a JSON byte array with config.

Parses a JSON byte array with config.

Attributes

Source
Json.scala
def parse(input: String, config: ReaderConfig): Either[SchemaError, Json]

Parses a JSON string with config.

Parses a JSON string with config.

Attributes

Source
Json.scala
def parse(input: CharSequence): Either[SchemaError, Json]

Parses a JSON CharSequence into a Json value.

Parses a JSON CharSequence into a Json value.

Attributes

Source
Json.scala
def parse(input: CharSequence, config: ReaderConfig): Either[SchemaError, Json]

Parses a JSON CharSequence with config.

Parses a JSON CharSequence with config.

Attributes

Source
Json.scala
def parse(input: ByteBuffer): Either[SchemaError, Json]

Parses a JSON ByteBuffer into a Json value.

Parses a JSON ByteBuffer into a Json value.

Attributes

Source
Json.scala
def parse(input: ByteBuffer, config: ReaderConfig): Either[SchemaError, Json]

Parses a JSON ByteBuffer with config.

Parses a JSON ByteBuffer with config.

Attributes

Source
Json.scala
def parse(input: Chunk[Byte]): Either[SchemaError, Json]

Parses a JSON Chunk of bytes (UTF-8) into a Json value.

Parses a JSON Chunk of bytes (UTF-8) into a Json value.

Attributes

Source
Json.scala
def parse(input: Chunk[Byte], config: ReaderConfig): Either[SchemaError, Json]

Parses a JSON Chunk of bytes (UTF-8) with config.

Parses a JSON Chunk of bytes (UTF-8) with config.

Attributes

Source
Json.scala
def parseUnsafe(input: String): Json

Parses a JSON string, throwing SchemaError on failure.

Parses a JSON string, throwing SchemaError on failure.

Attributes

Source
Json.scala

Concrete fields

val False: Boolean

The JSON false value.

The JSON false value.

Attributes

Source
Json.scala
val True: Boolean

The JSON true value.

The JSON true value.

Attributes

Source
Json.scala

Attributes

Source
Json.scala

Implicits

Implicits

implicit lazy val arraySchema: Schema[Array]

Attributes

Source
Json.scala
implicit lazy val booleanSchema: Schema[Boolean]

Attributes

Source
Json.scala
implicit lazy val nullSchema: Schema[Null.type]

Attributes

Source
Json.scala
implicit lazy val numberSchema: Schema[Number]

Attributes

Source
Json.scala
implicit lazy val objectSchema: Schema[Object]

Attributes

Source
Json.scala
implicit val ordering: Ordering[Json]

Attributes

Source
Json.scala
implicit lazy val schema: Schema[Json]

Attributes

Source
Json.scala
implicit lazy val stringSchema: Schema[String]

Attributes

Source
Json.scala