the reason why `macro genTableJson*(name: untyped, fields: static JsonNode): 
untyped =` does not work is JsonNode object can not be assigned to a Ident at 
compile time
    
    
    # Error: invalid type: 'JsonNode' for const
      
      const exampleData = %*{
        "name": "John Doe",
        "age": 30,
        "city": "New York"
      }
    
    
    
    
    Run

where `const exampleDataStr = """{"name": "JK", "age": 30, "address": 
"Tokyo"}"""` is ok at compile time

Reply via email to