Package

unicorn

json

Permalink

package json

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. json
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait BaseJsonSerializer extends JsonSerializer

    Permalink

    Json serializer helper functions.

  2. class BsonSerializer extends BaseJsonSerializer with Logging

    Permalink

    JSON Serializer in BSON format as defined by http://bsonspec.org/spec.html.

    JSON Serializer in BSON format as defined by http://bsonspec.org/spec.html. This is not fully compatible with BSON spec, where the root must be a document/JsObject. In contrast, the root can be any JsValue in our implementation. Correspondingly, the root will always has the type byte as the first byte.

    Not Multi-threading safe. Each thread should have its own BsonSerializer instance. Data size limit to 16MB by default.

    ByteBuffer must use BIG ENDIAN to ensure the correct byte string comparison for integers and floating numbers.

  3. class ColumnarJsonSerializer extends BaseJsonSerializer

    Permalink

    This JSON Serializer recursively encodes each field to a byte string, which can be saved separately to a column in BigTable.

    This JSON Serializer recursively encodes each field to a byte string, which can be saved separately to a column in BigTable. The JsonPath of field can be used as the column name.

    Not Multi-threading safe. Each thread should have its own ColumnarJsonSerializer instance.

    ByteBuffer must use BIG ENDIAN to ensure the correct byte string comparison for integers and floating numbers.

  4. trait CompactPrinter extends JsonPrinter

    Permalink

    A JsonPrinter that produces compact JSON source without any superfluous whitespace.

    A JsonPrinter that produces compact JSON source without any superfluous whitespace. Adopt from spray-json.

  5. class DataFrame extends Traversable[Row]

    Permalink

    Data frame of named columns.

  6. case class JsArray(elements: ArrayBuffer[JsValue]) extends JsValue with Traversable[JsValue] with Product with Serializable

    Permalink
  7. case class JsBinary(value: Array[Byte]) extends JsValue with Product with Serializable

    Permalink
  8. case class JsBoolean(value: Boolean) extends JsValue with Ordered[JsBoolean] with Product with Serializable

    Permalink
  9. case class JsCounter(value: Long) extends JsValue with Ordered[JsCounter] with Product with Serializable

    Permalink

    A counter is a 64 bit integer.

    A counter is a 64 bit integer. The difference from JsLong is mostly for internal representation in database. For encoding reason, the effective number of bits are 56, which should be big enough in practice.

  10. case class JsDate(value: Date) extends JsValue with Ordered[JsDate] with Product with Serializable

    Permalink
  11. case class JsDouble(value: Double) extends JsValue with Ordered[JsDouble] with Product with Serializable

    Permalink
  12. case class JsInt(value: Int) extends JsValue with Ordered[JsInt] with Product with Serializable

    Permalink
  13. case class JsLong(value: Long) extends JsValue with Ordered[JsLong] with Product with Serializable

    Permalink
  14. case class JsObject(fields: Map[String, JsValue]) extends JsValue with Product with Serializable

    Permalink
  15. case class JsObjectId(value: BsonObjectId) extends JsValue with Product with Serializable

    Permalink
  16. case class JsString(value: String) extends JsValue with Ordered[JsString] with Product with Serializable

    Permalink
  17. type JsTopLevel = Either[JsObject, JsArray]

    Permalink
  18. case class JsUUID(value: UUID) extends JsValue with Product with Serializable

    Permalink
  19. sealed trait JsValue extends Dynamic

    Permalink

    JSON value.

  20. implicit final class JsonHelper extends AnyVal

    Permalink
  21. class JsonParser extends AnyRef

    Permalink
  22. case class JsonPath(json: JsValue) extends Product with Serializable

    Permalink

    An implementation of JSONPath that follows the semantics described by Stefan Goessner on his blog.

    An implementation of JSONPath that follows the semantics described by Stefan Goessner on his blog.

    Adopt from https://github.com/josephpconley/play-jsonpath

    This parser supports all queries except for queries that rely on expressions of the underlying language like $..book[(@.length-1)]. However, there’s usually a ready workaround as you can execute the same query using $..book[-1:].

    One deviation from JSONPath is to always flatten the results of a recursive query. Using the bookstore example, typically a query of $..book will return an array with one element, the array of books. If there was another book array somewhere in the document, then $..book will return an array with two elements, both arrays of books. However, if you were to query $..book[2] for our example, you would get the second book in the first array, which assumes that the $..book result has been flattened. In order to make recursion easier and the code simpler, we always flatten the result of recursive queries regardless of the context.

  23. trait JsonPrinter extends (JsValue) ⇒ String

    Permalink

    A JsonPrinter serializes a JSON AST to a String.

    A JsonPrinter serializes a JSON AST to a String. Adopt from spray-json.

  24. trait JsonSerializer extends AnyRef

    Permalink

  25. trait ParserInput extends AnyRef

    Permalink
  26. trait PrettyPrinter extends JsonPrinter

    Permalink

    A JsonPrinter that produces a nicely readable JSON source.

    A JsonPrinter that produces a nicely readable JSON source. Adopt from spray-json.

  27. case class Row(elements: IndexedSeq[JsValue]) extends Traversable[JsValue] with Product with Serializable

    Permalink

    A row in data frame.

Value Members

  1. object CompactPrinter extends CompactPrinter

    Permalink
  2. object DataFrame

    Permalink
  3. object JsArray extends Serializable

    Permalink
  4. object JsBoolean extends Serializable

    Permalink
  5. object JsCounter extends Serializable

    Permalink
  6. object JsDate extends Serializable

    Permalink
  7. object JsDouble extends Serializable

    Permalink
  8. val JsFalse: JsBoolean

    Permalink
  9. object JsInt extends Serializable

    Permalink
  10. object JsLong extends Serializable

    Permalink
  11. object JsNull extends JsValue with Product with Serializable

    Permalink
  12. object JsObject extends Serializable

    Permalink
  13. object JsObjectId extends Serializable

    Permalink
  14. object JsString extends Serializable

    Permalink
  15. val JsTrue: JsBoolean

    Permalink
  16. object JsUUID extends Serializable

    Permalink
  17. object JsUndefined extends JsValue with Product with Serializable

    Permalink
  18. object JsValueOrdering extends Ordering[JsValue]

    Permalink
  19. object JsonParser

    Permalink

    Fast, no-dependency parser for JSON as defined by http://tools.ietf.org/html/rfc4627.

    Fast, no-dependency parser for JSON as defined by http://tools.ietf.org/html/rfc4627. Adopt from spray-json.

  20. object JsonPrinter

    Permalink
  21. object ParserInput

    Permalink
  22. object PrettyPrinter extends PrettyPrinter

    Permalink
  23. object Row extends Serializable

    Permalink
  24. implicit def array2JsValue(x: Array[JsValue]): JsArray

    Permalink
  25. implicit def boolean2JsValue(x: Boolean): JsBoolean

    Permalink
  26. implicit def byteArray2JsValue(x: Array[Byte]): JsBinary

    Permalink
  27. implicit def date2JsValue(x: Date): JsDate

    Permalink
  28. implicit def double2JsValue(x: Double): JsDouble

    Permalink
  29. implicit def int2JsValue(x: Int): JsInt

    Permalink
  30. implicit def jsArrayTopLevel(x: JsArray): Right[Nothing, JsArray]

    Permalink
  31. implicit def jsObjectTopLevel(x: JsObject): Left[JsObject, Nothing]

    Permalink
  32. implicit def json2Binary(x: JsBinary): Array[Byte]

    Permalink
  33. implicit def json2Boolean(json: JsValue): Boolean

    Permalink
  34. implicit def json2Boolean(x: JsBoolean): Boolean

    Permalink
  35. implicit def json2ByteArray(json: JsValue): Array[Byte]

    Permalink
  36. implicit def json2Date(json: JsValue): Date

    Permalink
  37. implicit def json2Date(x: JsDate): Date

    Permalink
  38. implicit def json2Double(json: JsValue): Double

    Permalink
  39. implicit def json2Double(x: JsDouble): Double

    Permalink
  40. implicit def json2Int(json: JsValue): Int

    Permalink
  41. implicit def json2Int(x: JsInt): Int

    Permalink
  42. implicit def json2Long(json: JsValue): Long

    Permalink
  43. implicit def json2Long(x: JsLong): Long

    Permalink
  44. implicit def json2String(json: JsValue): String

    Permalink
  45. implicit def json2String(x: JsString): String

    Permalink
  46. implicit def json2UUID(x: JsUUID): UUID

    Permalink
  47. implicit def long2JsValue(x: Long): JsLong

    Permalink
  48. implicit def map2JsValue(x: Map[String, JsValue]): JsObject

    Permalink
  49. implicit def map2JsValue(x: Map[String, JsValue]): JsObject

    Permalink
  50. implicit def map2JsValue(x: Seq[(String, JsValue)]): JsObject

    Permalink
  51. implicit def objectId2JsValue(x: BsonObjectId): JsObjectId

    Permalink
  52. implicit def pimpBooleanArray(x: Array[Boolean]): PimpedBooleanSeq

    Permalink
  53. implicit def pimpBooleanMap(x: Map[String, Boolean]): PimpedBooleanMap

    Permalink
  54. implicit def pimpBooleanMutableMap(x: Map[String, Boolean]): PimpedBooleanMutableMap

    Permalink
  55. implicit def pimpBooleanSeq(x: Seq[Boolean]): PimpedBooleanSeq

    Permalink
  56. implicit def pimpDateArray(x: Array[Date]): PimpedDateSeq

    Permalink
  57. implicit def pimpDateMap(x: Map[String, Date]): PimpedDateMap

    Permalink
  58. implicit def pimpDateMutableMap(x: Map[String, Date]): PimpedDateMutableMap

    Permalink
  59. implicit def pimpDateSeq(x: Seq[Date]): PimpedDateSeq

    Permalink
  60. implicit def pimpDoubleArray(x: Array[Double]): PimpedDoubleSeq

    Permalink
  61. implicit def pimpDoubleMap(x: Map[String, Double]): PimpedDoubleMap

    Permalink
  62. implicit def pimpDoubleMutableMap(x: Map[String, Double]): PimpedDoubleMutableMap

    Permalink
  63. implicit def pimpDoubleSeq(x: Seq[Double]): PimpedDoubleSeq

    Permalink
  64. implicit def pimpIntArray(x: Array[Int]): PimpedIntSeq

    Permalink
  65. implicit def pimpIntMap(x: Map[String, Int]): PimpedIntMap

    Permalink
  66. implicit def pimpIntMutableMap(x: Map[String, Int]): PimpedIntMutableMap

    Permalink
  67. implicit def pimpIntSeq(x: Seq[Int]): PimpedIntSeq

    Permalink
  68. implicit def pimpLongArray(x: Array[Long]): PimpedLongSeq

    Permalink
  69. implicit def pimpLongMap(x: Map[String, Long]): PimpedLongMap

    Permalink
  70. implicit def pimpLongMutableMap(x: Map[String, Long]): PimpedLongMutableMap

    Permalink
  71. implicit def pimpLongSeq(x: Seq[Long]): PimpedLongSeq

    Permalink
  72. implicit def pimpString(string: String): PimpedString

    Permalink
  73. implicit def pimpStringArray(x: Array[String]): PimpedStringSeq

    Permalink
  74. implicit def pimpStringMap(x: Map[String, String]): PimpedStringMap

    Permalink
  75. implicit def pimpStringMutableMap(x: Map[String, String]): PimpedStringMutableMap

    Permalink
  76. implicit def pimpStringSeq(x: Seq[String]): PimpedStringSeq

    Permalink
  77. implicit def seq2JsValue(x: Seq[JsValue]): JsArray

    Permalink
  78. implicit def string2JsValue(x: String): JsString

    Permalink
  79. implicit def uuid2JsValue(x: UUID): JsUUID

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped