trait Jsons extends AnyRef
Constructors and other utilities for JSON values.
- Source
- Json.scala
- Alphabetic
- By Inheritance
- Jsons
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
jArray: (JsonArray) ⇒ Json
Construct a JSON value that is an array.
-
def
jArrayElements(elements: Json*): Json
Construct a JSON value that is an array from a list of elements (var args).
-
val
jBool: (Boolean) ⇒ Json
Construct a JSON value that is a boolean.
-
val
jEmptyArray: Json
A JSON value that is an empty array.
-
val
jEmptyObject: Json
A JSON value that is an empty object.
-
val
jEmptyString: Json
A JSON value that is an empty string.
-
val
jFalse: Json
Construct a JSON boolean value of
false
. -
val
jNull: Json
Construct a JSON value that is
null
. -
def
jNumber(n: String): Option[Json]
Construct a JSON value that is a number.
-
def
jNumber(n: BigDecimal): Json
Construct a JSON value that is a number.
-
def
jNumber(n: Double): Option[Json]
Construct a JSON value that is a number.
Construct a JSON value that is a number.
Note: NaN, +Infinity and -Infinity are not valid json.
-
def
jNumber(n: Long): Json
Construct a JSON value that is a number.
-
def
jNumber(n: Int): Json
Construct a JSON value that is a number.
-
def
jNumber(n: JsonNumber): Json
Construct a JSON value that is a number.
-
def
jNumberOrNull(n: String): Option[Json]
Construct a JSON value that is a number.
Construct a JSON value that is a number. Transforming the Strings "NaN", "Infinity", "+Infinity" and "-Infinity" to jNull. This matches the behaviour of most browsers, but is a lossy operation as you can no longer distinguish between NaN and Infinity.
-
def
jNumberOrNull(n: Double): Json
Construct a JSON value that is a number.
Construct a JSON value that is a number. Transforming NaN, +Infinity and -Infinity to jNull. This matches the behaviour of most browsers, but is a lossy operation as you can no longer distinguish between NaN and Infinity.
-
def
jNumberOrString(n: String): Option[Json]
Construct a JSON value that is a number.
Construct a JSON value that is a number. Transforming the Strings "NaN", "Infinity", "+Infinity" and "-Infinity" to their string implementations.
This is an argonaut specific transformation that allows all doubles to be encoded without losing information, but aware interoperability is unlikely without custom handling of these values. See also
jNumber
andjNumberOrNull
. -
def
jNumberOrString(n: Double): Json
Construct a JSON value that is a number.
Construct a JSON value that is a number. Transforming NaN, +Infinity and -Infinity to their string implementations.
This is an argonaut specific transformation that allows all doubles to be encoded without losing information, but aware interoperability is unlikely without custom handling of these values. See also
jNumber
andjNumberOrNull
. -
val
jObject: (JsonObject) ⇒ Json
Construct a JSON value that is an object.
-
def
jObjectAssocList(x: JsonAssocList): Json
Construct a JSON value that is an object from an association list.
-
def
jObjectFields(x: (JsonField, Json)*): Json
Construct a JSON value that is an object from an association list (var args).
-
def
jSingleArray(j: Json): Json
Returns a function that takes a single value and produces a JSON array that contains only that value.
-
def
jSingleObject(k: JsonField, v: Json): Json
Returns a function that takes an association value and produces a JSON object that contains only that value.
-
val
jString: (JsonString) ⇒ Json
Construct a JSON value that is a string.
-
val
jTrue: Json
Construct a JSON boolean value of
true
. -
val
jZero: Json
A JSON value that is a zero number.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()