JsonValue

org.sigilaris.core.codec.json.JsonValue
See theJsonValue companion enum
object JsonValue

Attributes

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

Members list

Type members

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 arr(values: JsonValue*): JsonValue

Constructs a JSON array from values.

Constructs a JSON array from values.

val numbers = JsonValue.arr(JNumber(1), JNumber(2), JNumber(3))

Attributes

Source
JsonValue.scala
inline def nullValue: JsonValue

Convenience alias for JNull.

Convenience alias for JNull.

Attributes

Source
JsonValue.scala
def obj(fields: (String, JsonValue)*): JsonValue

Constructs a JSON object from field pairs.

Constructs a JSON object from field pairs.

val person = JsonValue.obj(
 "name" -> JString("Alice"),
 "age"  -> JNumber(30),
)

Attributes

Source
JsonValue.scala