Json

object Json
Companion:
class
Source:
Json.scala
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Json.type

Type members

Classlikes

trait Folder[X] extends Serializable

Represents a set of operations for reducing a Json instance to a value.

Represents a set of operations for reducing a Json instance to a value.

Source:
Json.scala

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
Source:
Mirror.scala

The name of the type

The name of the type

Inherited from:
Mirror
Source:
Mirror.scala

Value members

Concrete methods

final def arr(values: Json*): Json

Create a Json value representing a JSON array from values.

Create a Json value representing a JSON array from values.

Source:
Json.scala
final def fromBigDecimal(value: BigDecimal): Json

Create a Json value representing a JSON number from a BigDecimal.

Create a Json value representing a JSON number from a BigDecimal.

Source:
Json.scala
final def fromBigInt(value: BigInt): Json

Create a Json value representing a JSON number from a BigInt.

Create a Json value representing a JSON number from a BigInt.

Source:
Json.scala
final def fromBoolean(value: Boolean): Json

Create a Json value representing a JSON boolean.

Create a Json value representing a JSON boolean.

Source:
Json.scala
final def fromDouble(value: Double): Option[Json]

Try to create a Json value representing a JSON number from a Double.

Try to create a Json value representing a JSON number from a Double.

The result is empty if the argument cannot be represented as a JSON number.

Source:
Json.scala
final def fromDoubleOrNull(value: Double): Json

Create a Json value representing a JSON number or null from a Double.

Create a Json value representing a JSON number or null from a Double.

The result is a JSON null if the argument cannot be represented as a JSON number.

Source:
Json.scala
final def fromDoubleOrString(value: Double): Json

Create a Json value representing a JSON number or string from a Double.

Create a Json value representing a JSON number or string from a Double.

The result is a JSON string if the argument cannot be represented as a JSON number.

Source:
Json.scala
final def fromFields(fields: Iterable[(String, Json)]): Json

Create a Json value representing a JSON object from a collection of key-value pairs.

Create a Json value representing a JSON object from a collection of key-value pairs.

Source:
Json.scala
final def fromFloat(value: Float): Option[Json]

Try to create a Json value representing a JSON number from a Float.

Try to create a Json value representing a JSON number from a Float.

The result is empty if the argument cannot be represented as a JSON number.

Source:
Json.scala
final def fromFloatOrNull(value: Float): Json

Create a Json value representing a JSON number or null from a Float.

Create a Json value representing a JSON number or null from a Float.

The result is a JSON null if the argument cannot be represented as a JSON number.

Source:
Json.scala
final def fromFloatOrString(value: Float): Json

Create a Json value representing a JSON number or string from a Float.

Create a Json value representing a JSON number or string from a Float.

The result is a JSON string if the argument cannot be represented as a JSON number.

Source:
Json.scala
final def fromInt(value: Int): Json

Create a Json value representing a JSON number from an Int.

Create a Json value representing a JSON number from an Int.

Source:
Json.scala
final def fromJsonNumber(value: JsonNumber): Json

Create a Json value representing a JSON number from a JsonNumber.

Create a Json value representing a JSON number from a JsonNumber.

Source:
Json.scala
final def fromJsonObject(value: JsonObject): Json

Create a Json value representing a JSON object from a JsonObject.

Create a Json value representing a JSON object from a JsonObject.

Source:
Json.scala
final def fromLong(value: Long): Json

Create a Json value representing a JSON number from a Long.

Create a Json value representing a JSON number from a Long.

Source:
Json.scala
final def fromString(value: String): Json

Create a Json value representing a JSON string.

Create a Json value representing a JSON string.

Note that this does not parse the argument.

Source:
Json.scala
final def fromValues(values: Iterable[Json]): Json

Create a Json value representing a JSON array from a collection of values.

Create a Json value representing a JSON array from a collection of values.

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

Create a Json value representing a JSON object from key-value pairs.

Create a Json value representing a JSON object from key-value pairs.

Source:
Json.scala

Concrete fields

final val False: Json
Source:
Json.scala
final val Null: Json
Source:
Json.scala
final val True: Json
Source:
Json.scala

Implicits

Implicits

final implicit val eqJson: Eq[Json]
Source:
Json.scala
final implicit val showJson: Show[Json]
Source:
Json.scala