The source says
    
    
    proc `%`*[T: object](o: T): JsonNode =
      ## Construct JsonNode from tuples and objects.
      result = newJObject()
      for k, v in o.fieldPairs: result[k] = %v
    
    
    Run

which implies this function should have have taken both objects and tuples.

To get around this you could declare your own function
    
    
    proc `%`*[T: tuple](o: T): JsonNode =
      result = newJObject()
      for k, v in o.fieldPairs: result[k] = %v
    
    
    Run

You could open an issue on github. It should be a simple enough fix.

Reply via email to