src/sunny

Search:
Group by:
Source   Edit  

Types

JsonValue = object
  start*, len*: int
  case kind*: JsonValueKind
  of StringValue, NumberValue, NullValue:
    nil
  of BooleanValue:
    b*: bool
  of ObjectValue:
    o*: seq[(string, JsonValue)]
  of ArrayValue:
    a*: seq[JsonValue]
Source   Edit  
JsonValueKind = enum
  StringValue, NumberValue, BooleanValue, NullValue, ObjectValue, ArrayValue
Source   Edit  
RawJson = distinct string
Source   Edit  
SomeTable[K; V] = Table[K, V] | OrderedTable[K, V] | TableRef[K, V] |
    OrderedTableRef[K, V]
Source   Edit  

Procs

proc fromJson(v: var bool; value: JsonValue; input: string) {....gcsafe,
    raises: [CatchableError], tags: [], forbids: [].}
Source   Edit  
proc fromJson(v: var char; value: JsonValue; input: string) {....gcsafe,
    raises: [CatchableError], tags: [], forbids: [].}
Source   Edit  
proc fromJson(v: var RawJson; value: JsonValue; input: string) {....gcsafe,
    raises: [], tags: [], forbids: [].}
Source   Edit  
proc fromJson(v: var SomeFloat; value: JsonValue; input: string) {....gcsafe.}
Source   Edit  
proc fromJson(v: var SomeSignedInt; value: JsonValue; input: string) {....gcsafe.}
Source   Edit  
proc fromJson(v: var SomeUnsignedInt; value: JsonValue; input: string) {....gcsafe.}
Source   Edit  
proc fromJson(v: var std.JsonNode; value: JsonValue; input: string) {....gcsafe,
    raises: [CatchableError], tags: [], forbids: [].}
Source   Edit  
proc fromJson(v: var string; value: JsonValue; input: string) {....gcsafe,
    raises: [CatchableError], tags: [], forbids: [].}
Source   Edit  
proc fromJson[T: array](v: var T; value: JsonValue; input: string) {....gcsafe.}
Source   Edit  
proc fromJson[T: distinct](v: var T; value: JsonValue; input: string) {....gcsafe.}
Source   Edit  
proc fromJson[T: enum](v: var T; value: JsonValue; input: string) {....gcsafe.}
Source   Edit  
proc fromJson[T: object](obj: var T; value: JsonValue; input: string) {....gcsafe.}
Source   Edit  
proc fromJson[T: ref](v: var T; value: JsonValue; input: string) {....gcsafe.}
Source   Edit  
proc fromJson[T: tuple](v: var T; value: JsonValue; input: string) {....gcsafe.}
Source   Edit  
proc fromJson[T](v: var (SomeSet[T] | set[T]); value: JsonValue; input: string) {.
    ...gcsafe.}
Source   Edit  
proc fromJson[T](v: var Option[T]; value: JsonValue; input: string) {....gcsafe.}
Source   Edit  
proc fromJson[T](v: var seq[T]; value: JsonValue; input: string) {....gcsafe.}
Source   Edit  
proc fromJson[T](v: var SomeTable[string, T]; value: JsonValue; input: string) {.
    ...gcsafe.}
Source   Edit  
proc fromJson[T](x: typedesc[T]; input: RawJson): T {....gcsafe.}
Source   Edit  
proc fromJson[T](x: typedesc[T]; input: string): T {....gcsafe.}
Source   Edit  
proc toJson(src: bool; s: var string) {....gcsafe, raises: [], tags: [],
                                        forbids: [].}
Source   Edit  
proc toJson(src: char; s: var string) {....gcsafe, raises: [CatchableError],
                                        tags: [], forbids: [].}
Source   Edit  
proc toJson(src: RawJson; s: var string) {....gcsafe, raises: [], tags: [],
    forbids: [].}
Source   Edit  
proc toJson(src: SomeFloat; s: var string) {....gcsafe.}
Source   Edit  
proc toJson(src: SomeSignedInt; s: var string) {....gcsafe.}
Source   Edit  
proc toJson(src: SomeUnsignedInt; s: var string) {....gcsafe.}
Source   Edit  
proc toJson(src: std.JsonNode; s: var string) {....gcsafe,
    raises: [CatchableError], tags: [], forbids: [].}
Source   Edit  
proc toJson(src: string; s: var string) {....gcsafe, raises: [CatchableError],
    tags: [], forbids: [].}
Source   Edit  
proc toJson[T: array](src: T; s: var string) {....gcsafe.}
Source   Edit  
proc toJson[T: distinct](src: T; s: var string) {....gcsafe.}
Source   Edit  
proc toJson[T: enum](src: T; s: var string) {....gcsafe.}
Source   Edit  
proc toJson[T: object](src: T; s: var string) {....gcsafe.}
Source   Edit  
proc toJson[T: ref](src: T; s: var string) {....gcsafe.}
Source   Edit  
proc toJson[T: tuple](src: T; s: var string) {....gcsafe.}
Source   Edit  
proc toJson[T](src: (SomeSet[T] | set[T]); s: var string) {....gcsafe.}
Source   Edit  
proc toJson[T](src: Option[T]; s: var string) {....gcsafe.}
Source   Edit  
proc toJson[T](src: seq[T]; s: var string) {....gcsafe.}
Source   Edit  
proc toJson[T](src: SomeTable[string, T]; s: var string) {....gcsafe.}
Source   Edit  
proc toJson[T](src: T): string {....gcsafe.}
Source   Edit  
proc unescapeString(value: JsonValue; input: string): string {.inline, ...gcsafe,
    raises: [CatchableError], tags: [], forbids: [].}
Source   Edit  

Templates

template json(v: string = ""; extraFields: untyped = {}) {.pragma.}
Source   Edit