Package

org.dianahep.histogrammar

json

Permalink

package json

Provides support for parsing and stringifying JSON.

This module is a new implementation; it does not depend on packages such as Jackson. This choice was to provide the following features:

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. implicit class HasKeySet extends AnyRef

    Permalink
  2. class InvalidJsonException extends Exception

    Permalink

    Exception type for strings that cannot be parsed because they are not proper JSON.

  3. sealed trait Json extends AnyRef

    Permalink

    Interface for all parsed, in-memory JSON objects.

  4. case class JsonArray(elements: Json*) extends JsonContainer with Product with Serializable

    Permalink

    Concrete class for JSON arrays.

    Concrete class for JSON arrays.

    elements

    Note: a varargs sequence; to fill from a Scala Seq, use the myseq: _* syntax.

  5. trait JsonBoolean extends JsonPrimitive

    Permalink

    Interface for JSON booleans (true and false).

  6. trait JsonContainer extends Json

    Permalink

    Interface for all JSON containers: arrays and objects (mappings).

  7. case class JsonFloat(value: Double) extends JsonNumber with Product with Serializable

    Permalink

    Concrete class for JSON floating point numbers.

    Concrete class for JSON floating point numbers.

    (Double type for more generality than Float, though the JSON spec allows arbitrary precision).

  8. class JsonFormatException extends Exception

    Permalink

    Exception type for unexpected JSON structure, thrown by fromJson methods.

  9. case class JsonInt(value: Long) extends JsonNumber with Product with Serializable

    Permalink

    Concrete class for JSON integers.

    Concrete class for JSON integers.

    (Long type for more generality than Int, though the JSON spec allows arbitrary precision).

  10. trait JsonNumber extends JsonPrimitive

    Permalink

    Interface for JSON numbers, both integral and floating point.

  11. case class JsonObject(pairs: (JsonString, Json)*) extends JsonContainer with Product with Serializable

    Permalink

    Concrete class for JSON objects (mappings).

    Concrete class for JSON objects (mappings).

    pairs

    Note: a varargs sequence; to fill from a Scala Seq, use the myseq: _* syntax.

  12. trait JsonPrimitive extends Json

    Permalink

    Interface for all JSON primitives: null, true, false, numbers, and strings.

  13. case class JsonString(value: String) extends JsonPrimitive with Product with Serializable

    Permalink

    Concrete class for JSON strings.

    Concrete class for JSON strings.

    Note: the strings "-inf", "inf", and "nan" can be interpreted as numbers by org.dianahep.histogrammar.json.JsonNumber. If JsonNumber parsing is attempted before JsonString in an orElse chain, these three values would become numbers; otherwise they would become strings. Standard parsing (provided by the org.dianahep.histogrammar.json.JsonPrimitive and org.dianahep.histogrammar.json.Json objects) attempts to interpret them as numbers first.

  14. case class ParseState(str: String, pos: Int = 0) extends Product with Serializable

    Permalink

    Status of JSON-parsing an in-memory string.

    Status of JSON-parsing an in-memory string. Holds the position (pos), allows peeking (remaining), and manages a stack of unwind-protection.

Value Members

  1. object Json

    Permalink

    Entry point for parsing JSON.

  2. object JsonArray extends Serializable

    Permalink
  3. object JsonBoolean

    Permalink
  4. object JsonContainer

    Permalink
  5. object JsonFalse extends JsonBoolean with Product with Serializable

    Permalink

    Concrete singleton for JSON false.

  6. object JsonFloat extends Serializable

    Permalink
  7. object JsonInt extends Serializable

    Permalink
  8. object JsonNull extends JsonPrimitive with Product with Serializable

    Permalink

    Concrete singleton for JSON null.

  9. object JsonNumber

    Permalink
  10. object JsonObject extends Serializable

    Permalink
  11. object JsonPrimitive

    Permalink
  12. object JsonString extends Serializable

    Permalink
  13. object JsonTrue extends JsonBoolean with Product with Serializable

    Permalink

    Concrete singleton for JSON true.

  14. implicit def booleanToJson(x: Boolean): JsonBoolean with Product with Serializable

    Permalink
  15. implicit def byteToJson(x: Byte): JsonInt

    Permalink
  16. implicit def charToJson(x: Char): JsonString

    Permalink
  17. implicit def doubleToJson(x: Double): JsonFloat

    Permalink
  18. implicit def floatToJson(x: Float): JsonFloat

    Permalink
  19. implicit def intToJson(x: Int): JsonInt

    Permalink
  20. implicit def longToJson(x: Long): JsonInt

    Permalink
  21. implicit def shortToJson(x: Short): JsonInt

    Permalink
  22. implicit def stringToJson(x: String): JsonString

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped