Well if you look at the `to` procedure in the `json` module it takes a 
`JsonNode` and a `typedesc`. It is also very generic so your code could simply 
be:
    
    
    import json
    
    type
      Object = object
        val1: int
        val2: string
    
    let
      js = parseFile("status.json")
      obj = js.to(Object)
    
    
    Run

Reply via email to