src/jsonpak/parser

Search:
Group by:
Source   Edit  

Procs

proc parseFile(filename: string): JsonTree {.
    ...raises: [IOError, OSError, ValueError, JsonParsingError],
    tags: [ReadIOEffect, WriteIOEffect], forbids: [].}
Parses file into a JsonNode. If file contains extra data, it will raise JsonParsingError. Source   Edit  
proc parseJson(buffer: string): JsonTree {.
    ...raises: [IOError, OSError, ValueError, JsonParsingError],
    tags: [ReadIOEffect, WriteIOEffect], forbids: [].}
Parses JSON from buffer. If buffer contains extra data, it will raise JsonParsingError. Source   Edit  
proc parseJson(s: Stream; filename: string = ""): JsonTree {.
    ...raises: [IOError, OSError, IOError, OSError, ValueError, JsonParsingError],
    tags: [ReadIOEffect, WriteIOEffect], forbids: [].}
Parses from a stream s into a JsonNode. filename is only needed for nice error messages. If s contains extra data, it will raise JsonParsingError. Source   Edit