argonaut

Json

sealed trait Json extends AnyRef

A data type representing possible JSON values.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Json
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. def -->>:(k: ⇒ Json): Json

    If this is a JSON array, then prepend the given value, otherwise, return a JSON array with only the given value.

  4. def -->>?:(o: ⇒ Option[Json]): Json

    If this is a JSON array, and the element is set, then prepend the given value, otherwise, return a JSON array with only the given value.

  5. def ->:(k: ⇒ Json.JsonAssoc): Json

    If this is a JSON object, then prepend the given value, otherwise, return a JSON object with only the given value.

  6. def ->?:(o: ⇒ Option[Json.JsonAssoc]): Json

    If this is a JSON object, and the association is set, then prepend the given value, otherwise, return a JSON object with only the given value.

  7. def -|(f: ⇒ Json.JsonField): Option[Json]

    Alias for field.

  8. def -||(fs: List[Json.JsonField]): Option[Json]

    Returns a possible JSON value after traversing through JSON object values using the given field names.

  9. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def acursor: ACursor

    Constructor a cursor from this JSON value to track history.

  11. def array: Option[Json.JsonArray]

    Returns the possible array of this JSON value.

  12. def arrayOr(d: ⇒ Json.JsonArray): Json.JsonArray

    Returns the array of this JSON value, or the given default if this JSON value is not an array.

    Returns the array of this JSON value, or the given default if this JSON value is not an array.

    d

    The default array if this JSON value is not an array.

  13. def arrayOrEmpty: Json.JsonArray

    Returns the array of this JSON value, or an empty array if this JSON value is not an array.

  14. def arrayOrObject[X](or: ⇒ X, jsonArray: (Json.JsonArray) ⇒ X, jsonObject: (JsonObject) ⇒ X): X

    Run on an array or object or return the given default.

  15. def as[A](implicit e: DecodeJson[A]): DecodeResult[A]

    Attempts to decode this JSON value to another data type, alias for jdecode.

  16. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  17. def assoc: Option[List[Json.JsonAssoc]]

    Returns the possible object of this JSON value as an association list.

  18. def bool: Option[Boolean]

    Returns the possible boolean of this JSON value.

  19. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. def cursor: Cursor

    Constructor a cursor from this JSON value (alias for unary_+).

  21. def deepmerge(y: Json): 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, Array, Boolean, String and Number are treated as values, and values from the argument JSON completely replace values from this JSON.

  22. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  23. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  24. def field(f: ⇒ Json.JsonField): Option[Json]

    Returns the possible value for the given JSON object field.

  25. def fieldOr(f: ⇒ Json.JsonField, j: ⇒ Json): Json

    Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns the default.

    Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns the default..

  26. def fieldOrEmptyArray(f: ⇒ Json.JsonField): Json

    Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns an empty JSON array.

  27. def fieldOrEmptyObject(f: ⇒ Json.JsonField): Json

    Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns an empty JSON object.

  28. def fieldOrEmptyString(f: ⇒ Json.JsonField): Json

    Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns an empty JSON.

  29. def fieldOrFalse(f: ⇒ Json.JsonField): Json

    Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns a JSON boolean with the value false.

  30. def fieldOrNull(f: ⇒ Json.JsonField): Json

    Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns a JSON null.

    Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns a JSON null..

  31. def fieldOrTrue(f: ⇒ Json.JsonField): Json

    Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns a JSON boolean with the value true.

  32. def fieldOrZero(f: ⇒ Json.JsonField): Json

    Returns the value for the given JSON object field if this is an object with the given field, otherwise, returns a JSON number with the value 0.

  33. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  34. def fold[X](jsonNull: ⇒ X, jsonBool: (Boolean) ⇒ X, jsonNumber: (Json.JsonNumber) ⇒ X, jsonString: (String) ⇒ X, jsonArray: (Json.JsonArray) ⇒ X, jsonObject: (JsonObject) ⇒ X): X

    The catamorphism for the JSON value data type.

  35. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  36. def hasField(f: ⇒ Json.JsonField): Boolean

    Returns true if this is a JSON object which has the given field, false otherwise.

  37. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  38. def hcursor: HCursor

    Constructor a cursor from this JSON value to track history.

  39. def isArray: Boolean

    Return true if this JSON value is a array.

  40. def isBool: Boolean

    Return true if this JSON value is a boolean.

  41. def isFalse: Boolean

    Return true if this JSON value is a boolean with a value of false, otherwise, false.

  42. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  43. def isNull: Boolean

    Return true if this JSON value is null, otherwise, false.

  44. def isNumber: Boolean

    Return true if this JSON value is a number.

  45. def isObject: Boolean

    Return true if this JSON value is a object.

  46. def isString: Boolean

    Return true if this JSON value is a string.

  47. def isTrue: Boolean

    Return true if this JSON value is a boolean with a value of true, otherwise, false.

  48. def jdecode[A](implicit e: DecodeJson[A]): DecodeResult[A]

    Attempts to decode this JSON value to another data type.

  49. def name: String

    The name of the type of the JSON value.

  50. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  51. def nospaces: String

    Pretty-print this JSON value to a string with no spaces.

  52. def not: Json

    If this is a JSON boolean value, invert the true and false values, otherwise, leave unchanged.

  53. final def notify(): Unit

    Definition Classes
    AnyRef
  54. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  55. def number: Option[Json.JsonNumber]

    Returns the possible number of this JSON value.

  56. def numberOr(d: ⇒ Json.JsonNumber): Json.JsonNumber

    Returns the number of this JSON value, or the given default if this JSON value is not a number.

    Returns the number of this JSON value, or the given default if this JSON value is not a number.

    d

    The default number if this JSON value is not a number.

  57. def numberOrZero: Json.JsonNumber

    Returns this JSON number object or the value 0 if it is not a number.

  58. def obj: Option[JsonObject]

    Returns the possible object of this JSON value.

  59. def objectFields: Option[List[Json.JsonField]]

    Return the object keys if this JSON value is an object, otherwise, return the empty list.

  60. def objectFieldsOr(f: ⇒ List[Json.JsonField]): List[Json.JsonField]

    Returns the object map keys of this JSON value, or the given default if this JSON value is not an object.

    Returns the object map keys of this JSON value, or the given default if this JSON value is not an object.

    f

    The default object map keys if this JSON value is not an object.

  61. def objectFieldsOrEmpty: List[Json.JsonField]

    Returns the object map keys of this JSON value, or the empty list if this JSON value is not an object.

  62. def objectOr(d: ⇒ JsonObject): JsonObject

    Returns the object of this JSON value, or the given default if this JSON value is not a object.

    Returns the object of this JSON value, or the given default if this JSON value is not a object.

    d

    The default object if this JSON value is not an object.

  63. def objectOrEmpty: JsonObject

    Returns the object of this JSON value, or the empty object if this JSON value is not an object.

  64. def objectValues: Option[List[Json]]

    Return the object values if this JSON value is an object, otherwise, return the empty list.

  65. def objectValuesOr(k: ⇒ List[Json]): List[Json]

    Returns the object map values of this JSON value, or the given default if this JSON value is not an object.

    Returns the object map values of this JSON value, or the given default if this JSON value is not an object.

    k

    The default object map values if this JSON value is not an object.

  66. def objectValuesOrEmpty: List[Json]

    Returns the object map values of this JSON value, or the empty list if this JSON value is not an object.

  67. def pretty(p: PrettyParams): String

    Pretty-print this JSON value to a string using the given pretty-printing parameters.

  68. def spaces2: String

    Pretty-print this JSON value to a string indentation of two spaces.

  69. def spaces4: String

    Pretty-print this JSON value to a string indentation of four spaces.

  70. def string: Option[Json.JsonString]

    Returns the possible string of this JSON value.

  71. def stringOr(d: ⇒ Json.JsonString): Json.JsonString

    Returns the string of this JSON value, or the given default if this JSON value is not a string.

    Returns the string of this JSON value, or the given default if this JSON value is not a string.

    d

    The default string if this JSON value is not a string.

  72. def stringOrEmpty: Json.JsonString

    Returns the string of this JSON value, or an empty string if this JSON value is not a string.

  73. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  74. def toString(): String

    Compute a String representation for this JSON value.

    Compute a String representation for this JSON value.

    Definition Classes
    Json → AnyRef → Any
  75. def unary_+: Cursor

    Constructor a cursor from this JSON value (alias for cursor).

  76. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  77. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  78. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  79. def withArray(k: (Json.JsonArray) ⇒ Json.JsonArray): Json

    If this is a JSON array value, run the given function on the value, otherwise, leave unchanged.

  80. def withNumber(k: (Json.JsonNumber) ⇒ Json.JsonNumber): Json

    If this is a JSON number value, run the given function on the value, otherwise, leave unchanged.

  81. def withObject(k: (JsonObject) ⇒ JsonObject): Json

    If this is a JSON object value, run the given function on the value, otherwise, leave unchanged.

  82. def withString(k: (Json.JsonString) ⇒ Json.JsonString): Json

    If this is a JSON string value, run the given function on the value, otherwise, leave unchanged.

Inherited from AnyRef

Inherited from Any

Ungrouped