0

The following type Response:

type
  Response* = object
    name: string
    vers: string
    features: Table[string, seq[string]]

which I'm trying to unmarshal a json to:

  let json = parseJson(text)
  let test = to(json, Response)

However to(json, Response) is throwing the following exception:

Error: unhandled exception: false Unable to process type: nnkBracketExpr

Can't figure out what I'm doing wrong, do I need to specify the features Table in another way?

Thanks

victorzki
  • 45
  • 1
  • 7
  • 1
    I tested the above with some dummy response data and it works as expected. See here: https://play.nim-lang.org/#ix=3ztN – hola Sep 20 '21 at 18:28
  • https://stackoverflow.com/help/minimal-reproducible-example – xbello Sep 22 '21 at 11:50

0 Answers0