com.rojoma.json.v3

io

package io

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

Type Members

  1. class BlockJsonTokenIterator extends AbstractBufferedIterator[JsonToken]

    Convert a character-stream into a token-stream.

    Convert a character-stream into a token-stream.

    This reads characters in blocks of size blockSize, so if the underlying Reader is to be re-used for other non-JSON purposes after finishing reading, a com.rojoma.json.v3.io.JsonTokenIterator should be used instead.

    As extensions to standard JSON, this reader supports single-quoted strings and Javascript-style comments.

    Unless you actually need tokens, prefer com.rojoma.json.v3.io.FusedBlockJsonEventIterator.

    See also

    com.rojoma.json.v3.io.JsonToken

    com.rojoma.json.v3.io.JsonTokenGenerator

    com.rojoma.json.v3.io.JsonTokenIterator

  2. class CompactJsonWriter extends JsonWriter

    An object that will write com.rojoma.json.v3.ast.JValues in a non-human-friendly "compact" format with no spaces or newlines.

    An object that will write com.rojoma.json.v3.ast.JValues in a non-human-friendly "compact" format with no spaces or newlines. This does many small writes, so it is probably a good idea to wrap the Writer in a BufferedWriter.

  3. case class EndOfArrayEvent()(position: Position) extends JsonEvent with Product with Serializable

  4. case class EndOfObjectEvent()(position: Position) extends JsonEvent with Product with Serializable

  5. class EventJsonReader extends JsonReader

    Parses a token-stream into a com.rojoma.json.v3.ast.JValue.

    Parses a token-stream into a com.rojoma.json.v3.ast.JValue. As an extension, this parser accepts unquoted strings (i.e., identifiers) as field-names.

  6. type FieldCache = (String, Int) ⇒ String

    A function for use in caching objects' field names, for memory reduction.

    A function for use in caching objects' field names, for memory reduction. In most places, this defaults to identity. In com.rojoma.json.v3.io.JsonReader however, a com.rojoma.json.v3.io.HashMapFieldCache is used because it is already known that the entire datum will be read into memory at once.

    The parameters are the field names and the depth of nesting at which it occurs.

  7. case class FieldEvent(name: String)(position: Position) extends JsonEvent with Product with Serializable

  8. class FusedBlockJsonEventIterator extends AbstractBufferedIterator[JsonEvent]

    Turns a raw character-stream into an event stream, checking for JSON well-formedness.

    Turns a raw character-stream into an event stream, checking for JSON well-formedness.

    A FusedBlockJsonEventIterator checks a character stream for syntactic correctness and produces events that reflect the syntax of JSON.

    As extension, this class allows comments and for unquoted identifiers to be used as object keys.

    See also

    com.rojoma.json.v3.io.JsonEvent

    com.rojoma.json.v3.io.JsonEventGenerator

    com.rojoma.json.v3.io.JsonEventIterator

  9. class FusedBlockJsonReader extends JsonReader

  10. class HashMapFieldCache extends FieldCache

  11. case class IdentifierEvent(text: String)(position: Position) extends JsonEvent with Product with Serializable

  12. sealed abstract class JValueGenerator extends AnyRef

  13. class JsonBadParse extends JsonReaderException with JsonReadException

    This exception should never be thrown if using the standard JsonEventIterator.

    This exception should never be thrown if using the standard JsonEventIterator. It means that either there were mismatched start/end array or object events or that an an object did not follow the pattern of FieldObject-followed-by-field-data.

  14. sealed abstract class JsonEOF extends JsonReaderException

  15. sealed abstract class JsonEvent extends AnyRef

  16. sealed abstract class JsonEventGenerator extends AnyRef

  17. class JsonEventIterator extends AbstractBufferedIterator[JsonEvent]

    Turns a raw token-stream into an event stream, checking for JSON well-formedness.

    Turns a raw token-stream into an event stream, checking for JSON well-formedness.

    A JsonEventIterator checks a token stream for syntactic correctness and produces events that reflect the syntax of JSON. It guarantees to demand no more input from the input iterator than is absolutely required.

    As an extension, this class allows unquoted identifiers to be used as object keys.

    See also

    com.rojoma.json.v3.io.JsonEvent

    com.rojoma.json.v3.io.JsonEventGenerator

    com.rojoma.json.v3.io.FusedBlockJsonEventIterator

  18. trait JsonLexException extends JsonReaderException

  19. class JsonLexerEOF extends JsonEOF with JsonLexException

  20. class JsonNumberOutOfRange extends JsonReaderException with JsonLexException

  21. trait JsonParseException extends JsonReaderException

  22. class JsonParserEOF extends JsonEOF with JsonParseException

  23. trait JsonReadException extends JsonReaderException

  24. trait JsonReader extends AnyRef

  25. abstract class JsonReaderException extends Exception

  26. sealed abstract class JsonToken extends AnyRef

  27. sealed abstract class JsonTokenGenerator extends AnyRef

  28. class JsonTokenIterator extends AbstractBufferedIterator[JsonToken]

    Convert a character-stream into a token-stream.

    Convert a character-stream into a token-stream.

    This is guaranteed to read no more than necessary to ensure it has reached the end of a single token. For objects, arrays, and strings, it will read only up to (and, of course, including) the closing delimiter. For other types, it may read one character further to assure itself that it has reached the end.

    A JsonTokenIterator does many small reads; it may be a good idea to wrap the input Reader into a BufferedReader. If you do not need to read non-JSON out of the underlying Reader afterward, a com.rojoma.json.v3.io.BlockJsonTokenIterator maybe be faster.

    As extensions to standard JSON, this reader supports single-quoted strings and Javascript-style comments.

    See also

    com.rojoma.json.v3.io.JsonToken

    com.rojoma.json.v3.io.JsonTokenGenerator

    com.rojoma.json.v3.io.BlockJsonTokenIterator

  29. class JsonUnexpectedCharacter extends JsonReaderException with JsonLexException

  30. class JsonUnexpectedToken extends JsonReaderException with JsonParseException

  31. class JsonUnknownIdentifier extends JsonReaderException with JsonParseException

  32. trait JsonWriter extends AnyRef

    An object that can serialize com.rojoma.json.v3.ast.JValues.

    An object that can serialize com.rojoma.json.v3.ast.JValues. The intention is to produce a (series of) JSON objects.

  33. sealed abstract class MalformedEventStreamException extends RuntimeException

  34. class NoSuchTokenException extends NoSuchElementException

  35. case class NumberEvent(number: String)(position: Position) extends JsonEvent with Product with Serializable

  36. final class Position extends AnyVal

  37. class PrettyJsonWriter extends JsonWriter

    An object that will write com.rojoma.json.v3.ast.JValues in a human-friendly indented format.

    An object that will write com.rojoma.json.v3.ast.JValues in a human-friendly indented format.

    The writer will try to keep as much data on a single line as possible. As a result, arrays and objects have two printing modes (selected automatically), "compact" and "indented".

    In the "compact" mode, an array is stored on a single line:

    [ elem1, elem2, ... ]

    Similarly for objects:

    { "key1" : value1, "key2 : value2, ... }

    In the "indented" mode, the delimiters appear on lines by themselves, with each element formatted on a separate line:

    [
    elem1,
    elem2,
    ...
    ]

    For objects, if a key/value pair does not fit on a single line, the value is printed on a line of its own, indented further:

    {
    "key" :
      value
    }

    Empty arrays and objects are always represented compactly, as [] or {} respectively.

    This does many small writes, so it is probably a good idea to wrap the Writer in a BufferedWriter.

  38. sealed abstract class SimpleJsonToken extends JsonToken

  39. case class StartOfArrayEvent()(position: Position) extends JsonEvent with Product with Serializable

  40. case class StartOfObjectEvent()(position: Position) extends JsonEvent with Product with Serializable

  41. case class StringEvent(string: String)(position: Position) extends JsonEvent with Product with Serializable

  42. case class TokenCloseBrace()(position: Position) extends SimpleJsonToken with Product with Serializable

  43. case class TokenCloseBracket()(position: Position) extends SimpleJsonToken with Product with Serializable

  44. case class TokenColon()(position: Position) extends SimpleJsonToken with Product with Serializable

  45. case class TokenComma()(position: Position) extends SimpleJsonToken with Product with Serializable

  46. case class TokenIdentifier(text: String)(position: Position) extends SimpleJsonToken with Product with Serializable

  47. case class TokenNumber(number: String)(position: Position) extends SimpleJsonToken with Product with Serializable

  48. case class TokenOpenBrace()(position: Position) extends SimpleJsonToken with Product with Serializable

  49. case class TokenOpenBracket()(position: Position) extends SimpleJsonToken with Product with Serializable

  50. case class TokenString(text: String)(position: Position) extends JsonToken with Product with Serializable

Value Members

  1. object CompactJsonWriter

  2. object EventJsonReader

  3. object EventTokenIterator extends (Iterator[JsonEvent]) ⇒ Iterator[JsonToken]

    A function which converts an Iterator[JsonEvent] into an Iterator[JsonToken].

    A function which converts an Iterator[JsonEvent] into an Iterator[JsonToken].

    returns

    An iterator of tokens that can be used to generate textual output

    Exceptions thrown
    MalformedEventStreamException

    if the event stream is not well-formed

  4. val IdentityFieldCache: FieldCache

  5. object JValueEventIterator extends (JValue) ⇒ Iterator[JsonEvent]

    A function which converts a JValue into an Iterator[JsonEvent].

    A function which converts a JValue into an Iterator[JsonEvent].

    returns

    An iterator of events that can be re-parsed or converted into tokens for output

  6. object JValueGenerator

  7. object JsonEvent

  8. object JsonEventGenerator

  9. object JsonEventIterator

  10. object JsonLexException extends Serializable

  11. object JsonParseException extends Serializable

  12. object JsonReadException extends Serializable

  13. object JsonReader

  14. object JsonReaderException extends Serializable

  15. object JsonToken

  16. object JsonTokenGenerator

  17. object MalformedEventStreamException extends Serializable

  18. object Position

  19. object PrettyJsonWriter

Inherited from AnyRef

Inherited from Any

Ungrouped