Types
CustomIntHandler = proc (dgt: int) {....gcsafe, raises: [].}
- Custom integer parser, result values need to be captured Source Edit
CustomNumberHandler = proc (part: NumberPart; dgt: int) {....gcsafe, raises: [].}
- Custom number parser, result values need to be captured Source Edit
CustomStringHandler = proc (b: char) {....gcsafe, raises: [].}
- Custom text or binary parser, result values need to be captured. Source Edit
NumberPart = enum SignPart, IntegerPart, FractionPart, ExpSignPart, ExponentPart
- Source Edit
Procs
proc customIntHandler(r: var JsonReader; handler: CustomIntHandler) {. ...raises: [IOError, JsonReaderError], raises: [], gcsafe.}
- Apply the handler argument function for parsing only integer part of JsonNumber Source Edit
proc customNumberHandler(r: var JsonReader; handler: CustomNumberHandler) {. ...raises: [IOError, JsonReaderError], raises: [], gcsafe.}
- Apply the handler argument function for parsing complete JsonNumber Source Edit
proc customStringHandler(r: var JsonReader; limit: int; handler: CustomStringHandler) {. ...raises: [IOError, JsonReaderError], raises: [], gcsafe.}
- Apply the handler argument function for parsing a String type value. Source Edit
proc parseAsString(r: var JsonReader): JsonString {. ...raises: [IOError, JsonReaderError], raises: [], gcsafe.}
- Source Edit
proc parseAsString(r: var JsonReader; val: var string) {. ...raises: [IOError, JsonReaderError], raises: [], gcsafe.}
- Source Edit
proc parseBool(r: var JsonReader): bool {....raises: [IOError, JsonReaderError], raises: [], gcsafe.}
- Source Edit
proc parseFloat(r: var JsonReader; T: type SomeFloat): T:type {. ...raises: [IOError, JsonReaderError], raises: [], gcsafe.}
- Source Edit
proc parseInt(r: var JsonReader; T: type SomeInteger; portable: bool = false): T:type {. ...raises: [IOError, JsonReaderError], raises: [], gcsafe.}
- Source Edit
proc parseJsonNode(r: var JsonReader): JsonNode {. ...raises: [IOError, JsonReaderError], raises: [], gcsafe.}
- Source Edit
proc parseNull(r: var JsonReader) {....raises: [IOError, JsonReaderError], raises: [], gcsafe.}
- Source Edit
proc parseNumber(r: var JsonReader; val: var JsonNumber) {. ...raises: [IOError, JsonReaderError], raises: [], gcsafe.}
- Source Edit
proc parseString(r: var JsonReader): string {. ...raises: [IOError, JsonReaderError], raises: [], gcsafe.}
- Source Edit
proc parseString(r: var JsonReader; limit: int): string {. ...raises: [IOError, JsonReaderError], raises: [], gcsafe.}
- Source Edit
proc parseValue(r: var JsonReader; val: var JsonValueRef) {. ...raises: [IOError, JsonReaderError], raises: [], gcsafe.}
- Source Edit
proc skipSingleJsValue(lex: var JsonLexer) {....raises: [IOError, JsonReaderError], raises: [], gcsafe, tags: [RootEffect], forbids: [].}
- Source Edit
proc toFloat(r: var JsonReader; val: JsonNumber; T: type SomeFloat): T:type {. ...raises: [JsonReaderError], raises: [], gcsafe.}
- Source Edit
proc toInt(r: var JsonReader; val: JsonNumber; T: type SomeSignedInt; portable: bool): T:type {....raises: [JsonReaderError], raises: [], gcsafe.}
- Source Edit
proc toInt(r: var JsonReader; val: JsonNumber; T: type SomeUnsignedInt; portable: bool): T:type {....raises: [IOError, JsonReaderError], raises: [], gcsafe.}
- Source Edit
proc tokKind(r: var JsonReader): JsonValueKind {. ...raises: [IOError, JsonReaderError], raises: [], gcsafe.}
- Source Edit
Templates
template checkError(r: var JsonReader) {..}
- Source Edit
template customIntValueIt(r: var JsonReader; body: untyped) {..}
-
Convenience wrapper around customIntHandler() for parsing integers.
The body argument represents a virtual function body. So the current digit processing can be exited with return.
Source Edit template customNumberValueIt(r: var JsonReader; body: untyped) {..}
-
Convenience wrapper around customIntHandler() for parsing numbers.
The body argument represents a virtual function body. So the current digit processing can be exited with return.
Source Edit template customStringValueIt(r: var JsonReader; body: untyped) {..}
-
Convenience wrapper around customStringHandler() for parsing a text terminating with a double quote character '"'.
The body argument represents a virtual function body. So the current character processing can be exited with return.
Source Edit template customStringValueIt(r: var JsonReader; limit: untyped; body: untyped) {..}
-
Convenience wrapper around customStringHandler() for parsing a text terminating with a double quote character '"'.
The body argument represents a virtual function body. So the current character processing can be exited with return.
Source Edit template parseArray(r: var JsonReader; body: untyped) {..}
- Source Edit
template parseArray(r: var JsonReader; idx: untyped; body: untyped) {..}
- Source Edit
template parseNumber(r: var JsonReader; T: type): auto {..}
- workaround Nim inablity to instantiate result type when one the argument is generic type and the other is a typedesc Source Edit
template parseObject(r: var JsonReader; key: untyped; body: untyped) {..}
- Source Edit
template parseObjectCustomKey(r: var JsonReader; keyAction: untyped; body: untyped) {..}
- Source Edit
template parseObjectSkipNullFields(r: var JsonReader; key: untyped; body: untyped) {..}
- Source Edit
template parseObjectWithoutSkip(r: var JsonReader; key: untyped; body: untyped) {..}
- Source Edit
template parseValue(r: var JsonReader; T: type): auto {..}
- workaround Nim inablity to instantiate result type when one the argument is generic type and the other is a typedesc Source Edit
template skipSingleJsValue(r: var JsonReader) {..}
- Source Edit
Exports
-
JsonReaderConf, etString, JsonValue, flavorRequiresAllFields, handleReadException, GenericJsonReaderError, ==, flavorEnumRep, JsonError, Reader, etBracketRi, EnumRepresentation, etBool, UnexpectedField, etColon, createJsonFlavor, JsonNumber, flavorEnumRep, etNumber, etCurrlyRi, IntOverflowError, defaultJsonReaderConf, raiseUnexpectedToken, automaticBuiltinSerialization, defaultJsonReaderFlags, flavorSkipNullFields, JsonReaderError, hasExponent, isFloat, automaticSerialization, IncompleteObjectError, $, toInt, JsonValueRef, UnexpectedTokenError, etEnumString, formatMsg, UnexpectedValueError, flavorOmitsOptionalFields, flavorUsesAutomaticObjectSerialization, flavorRequiresAllFields, JsonReaderFlag, JsonValueKind, JsonReader, maxPortableInt, supports, flavorEnumRep, formatMsg, JsonSign, formatMsg, etBracketLe, handleReadException, flavorAllowsUnknownFields, raiseUnexpectedField, flavorSkipNullFields, typeClassOrMemberAutoSerialize, assignLineNumber, etValue, formatMsg, ExpectedTokenCategory, automaticSerialization, flavorUsesAutomaticObjectSerialization, init, automaticBuiltinSerialization, flavorAllowsUnknownFields, Json, formatMsg, automaticPrimitivesSerialization, etComma, ReaderType, JsonString, automaticPrimitivesSerialization, generateJsonAutoSerializationAddon, typeAutoSerialize, etEnumAny, raiseIncompleteObject, valueType, JsonReaderFlags, DummyFlavor, raiseIntOverflow, etInt, mimeType, ==, typeClassOrMemberAutoSerialize, JsonVoid, etCurrlyLe, typeAutoSerialize, JsonObjectType, formatMsg, raiseUnexpectedField, formatMsg, flavorOmitsOptionalFields, init, raiseUnexpectedToken, minPortableInt, raiseIncompleteObject, raiseIntOverflow, raiseUnexpectedValue, raiseUnexpectedValue