Why I can't unmarshal JSON with spaces in the JSON keys?
Why I can't unmarshal JSON with spaces in the JSON keys? import json type FooBar = object `Foo Bar`: string const jsonString = "{\"Foo Bar\": \"Hello World\"}" let foobar = to(parseJson(jsonString), FooBar) Run [Nim Playground](h
How to generate import statement in macros?
# main.nim import macros macro gen_import(): untyped = return newNimNode(nnkImportStmt).add infix( ident("foo"), "as", ident("bar") ) gen_import() echo bar.foobar Run # foo.nim const foobar* = "foobar"