Hi, I'm very new to nim, but was wondering how I would go about converting a 
msgpack file back to the JSON file which was packed. In python I was able to 
achieve this simply with
    
    
    with open("filename", "rb") as in_file:
        data = msgpack.unpack(in_file)
    
    
    Run

But i can't seem to get this working in nim

For reference I am using the package msgpack4nim. What i tried (forgive any 
stupidity) is this: 
    
    
    import streams, msgpack4nim, json
    var fs = readFile("fileName")
    
    var output: JsonNode
    unpack(fs, output)
    
    
    Run

Any help is appreciated!

Reply via email to