json_serialization/reader_desc

Search:
Group by:
Source   Edit  

Types

ExpectedTokenCategory = enum
  etValue = "value", etBool = "bool literal", etInt = "integer",
  etEnumAny = "enum value (int / string)", etEnumString = "enum value (string)",
  etNumber = "number", etString = "string", etComma = "comma",
  etColon = "colon", etBracketLe = "array start bracket",
  etBracketRi = "array end bracker", etCurrlyLe = "object start bracket",
  etCurrlyRi = "object end bracket"
Source   Edit  
GenericJsonReaderError = object of JsonReaderError
  deserializedField*: string
  innerException*: ref CatchableError
Source   Edit  
JsonReader[Flavor] = object
  lex*: JsonLexer
Source   Edit  
JsonReaderError = object of types.JsonError
  line*, col*: int
Source   Edit  
UnexpectedField = object of JsonReaderError
  encounteredField*: string
  deserializedType*: cstring
Source   Edit  
UnexpectedTokenError = object of JsonReaderError
  encountedToken*: JsonValueKind
  expectedToken*: ExpectedTokenCategory
Source   Edit  

Procs

func assignLineNumber(ex: ref JsonReaderError; lex: JsonLexer) {....raises: [],
    gcsafe, tags: [], forbids: [].}
Source   Edit  
func handleReadException(lex: JsonLexer; Record: type; fieldName: string;
                         field: auto; err: ref CatchableError) {.
    ...raises: [JsonReaderError], raises: [], gcsafe.}
Source   Edit  
proc init(T: type JsonReader; stream: InputStream; allowUnknownFields = false;
          requireAllFields = false): T:type {....raises: [], gcsafe.}
Source   Edit  
proc init(T: type JsonReader; stream: InputStream; flags: JsonReaderFlags;
          conf: JsonReaderConf = defaultJsonReaderConf): T:type {....raises: [],
    gcsafe.}
Source   Edit  
func raiseIncompleteObject(lex: JsonLexer; objectType: cstring) {.noreturn,
    ...raises: [JsonReaderError], raises: [], gcsafe, tags: [], forbids: [].}
Source   Edit  
func raiseIntOverflow(lex: JsonLexer; absIntVal: BiggestUInt; isNegative: bool) {.
    noreturn, ...raises: [JsonReaderError], raises: [], gcsafe, tags: [],
    forbids: [].}
Source   Edit  
func raiseUnexpectedField(lex: JsonLexer; fieldName: string;
                          deserializedType: cstring) {.noreturn,
    ...raises: [JsonReaderError], raises: [], gcsafe, tags: [], forbids: [].}
Source   Edit  
proc raiseUnexpectedToken(lex: var JsonLexer; expected: ExpectedTokenCategory) {.
    noreturn, ...raises: [JsonReaderError, IOError], raises: [], gcsafe,
    tags: [RootEffect], forbids: [].}
Source   Edit  
func raiseUnexpectedValue(lex: JsonLexer; msg: string) {.noreturn,
    ...raises: [JsonReaderError], raises: [], gcsafe, tags: [], forbids: [].}
Source   Edit  

Methods

method formatMsg(err: ref GenericJsonReaderError; filename: string): string {.
    ...raises: [], gcsafe, tags: [], forbids: [].}
Source   Edit  
method formatMsg(err: ref IncompleteObjectError; filename: string): string {.
    ...raises: [], gcsafe, tags: [], forbids: [].}
Source   Edit  
method formatMsg(err: ref IntOverflowError; filename: string): string {.
    ...raises: [], gcsafe, tags: [], forbids: [].}
Source   Edit  
method formatMsg(err: ref JsonReaderError; filename: string): string {.
    ...raises: [], gcsafe, tags: [], forbids: [].}
Source   Edit  
method formatMsg(err: ref UnexpectedField; filename: string): string {.
    ...raises: [], gcsafe, tags: [], forbids: [].}
Source   Edit  
method formatMsg(err: ref UnexpectedTokenError; filename: string): string {.
    ...raises: [], gcsafe, tags: [], forbids: [].}
Source   Edit  
method formatMsg(err: ref UnexpectedValueError; filename: string): string {.
    ...raises: [], gcsafe, tags: [], forbids: [].}
Source   Edit  

Templates

template handleReadException(r: JsonReader; Record: type; fieldName: string;
                             field: auto; err: ref CatchableError) {..}
Source   Edit  
template raiseIncompleteObject(r: JsonReader; objectType: cstring) {..}
Source   Edit  
template raiseIntOverflow(r: JsonReader; absIntVal: BiggestUInt;
                          isNegative: bool) {..}
Source   Edit  
template raiseUnexpectedField(r: JsonReader; fieldName: string;
                              deserializedType: cstring) {..}
Source   Edit  
template raiseUnexpectedToken(reader: JsonReader;
                              expected: ExpectedTokenCategory) {..}
Source   Edit  
template raiseUnexpectedValue(r: JsonReader; msg: string) {..}
Source   Edit  
template Reader(T`gensym0: type Json; F`gensym0: distinct type = DefaultFlavor): type {..}
Source   Edit  
template ReaderType(T`gensym0: type Json;
                    F`gensym0: distinct type = DefaultFlavor): type {..}
Source   Edit