Class/Object

argonaut

Json

Related Docs: object Json | package argonaut

Permalink

sealed abstract class Json extends Product with Serializable

A data type representing possible JSON values.

Source
Json.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Json
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def canEqual(that: Any): Boolean

    Permalink
    Definition Classes
    Equals
  2. abstract def productArity: Int

    Permalink
    Definition Classes
    Product
  3. abstract def productElement(n: Int): Any

    Permalink
    Definition Classes
    Product

Concrete Value Members

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

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

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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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]

    Permalink

    Alias for field.

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

    Permalink

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. def acursor: ACursor

    Permalink

    Constructor a cursor from this JSON value to track history.

  11. def array: Option[Json.JsonArray]

    Permalink

    Returns the possible array of this JSON value.

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

    Permalink

    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

    Permalink

    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

    Permalink

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

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

    Permalink

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

  16. final def asInstanceOf[T0]: T0

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

    Permalink

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

  18. def bool: Option[Boolean]

    Permalink

    Returns the possible boolean of this JSON value.

  19. def clone(): AnyRef

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

    Permalink

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

  21. def deepmerge(y: Json): Json

    Permalink

    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

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

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

    Permalink

    Returns the possible value for the given JSON object field.

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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    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

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

    Permalink

    The catamorphism for the JSON value data type.

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

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

    Permalink

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

  37. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  38. def hcursor: HCursor

    Permalink

    Constructor a cursor from this JSON value to track history.

  39. def isArray: Boolean

    Permalink

    Return true if this JSON value is a array.

  40. def isBool: Boolean

    Permalink

    Return true if this JSON value is a boolean.

  41. def isFalse: Boolean

    Permalink

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

  42. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  43. def isNull: Boolean

    Permalink

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

  44. def isNumber: Boolean

    Permalink

    Return true if this JSON value is a number.

  45. def isObject: Boolean

    Permalink

    Return true if this JSON value is a object.

  46. def isString: Boolean

    Permalink

    Return true if this JSON value is a string.

  47. def isTrue: Boolean

    Permalink

    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]

    Permalink

    Attempts to decode this JSON value to another data type.

  49. def name: String

    Permalink

    The name of the type of the JSON value.

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

    Permalink
    Definition Classes
    AnyRef
  51. def nospaces: String

    Permalink

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

  52. def nospacesWithOrder: String

    Permalink

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

  53. def not: Json

    Permalink

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

  54. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  55. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  56. def number: Option[JsonNumber]

    Permalink

    Returns the possible number of this JSON value.

  57. def numberOr(d: ⇒ JsonNumber): JsonNumber

    Permalink

    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.

  58. def numberOrZero: JsonNumber

    Permalink

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

  59. def obj: Option[JsonObject]

    Permalink

    Returns the possible object of this JSON value.

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

    Permalink

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

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

    Permalink

    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.

  62. def objectFieldsOrEmpty: List[Json.JsonField]

    Permalink

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

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

    Permalink

    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.

  64. def objectOrEmpty: JsonObject

    Permalink

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

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

    Permalink

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

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

    Permalink

    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.

  67. def objectValuesOrEmpty: List[Json]

    Permalink

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

  68. def pretty(p: PrettyParams): String

    Permalink

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

  69. def productIterator: Iterator[Any]

    Permalink
    Definition Classes
    Product
  70. def productPrefix: String

    Permalink
    Definition Classes
    Product
  71. def spaces2: String

    Permalink

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

  72. def spaces4: String

    Permalink

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

  73. def string: Option[Json.JsonString]

    Permalink

    Returns the possible string of this JSON value.

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

    Permalink

    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.

  75. def stringOrEmpty: Json.JsonString

    Permalink

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

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

    Permalink
    Definition Classes
    AnyRef
  77. def toString(): String

    Permalink

    Compute a String representation for this JSON value.

    Compute a String representation for this JSON value.

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

    Permalink

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

  79. final def wait(): Unit

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

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

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

    Permalink

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

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped