Description
Heya, I'm currently working on a project and decided to use jsony
, but it seems that there's an issue with toJson
as shown with this error:
/home/runner/.nimble/pkgs2/jsony-1.1.5-6aeb83e7481ca8686396a568096054bc668294df/jsony.nim(739, 15) Error: attempting to call undeclared routine: 'toJson'
I'm unable to make a minimal reproducible example despite my efforts, so I simply added a step to my workflow to demonstrate the issue: https://github.com/Luyten-Orion/Supernovae/actions/runs/9423485799/job/25961966047#step:4:82
The code that causes the issue seems to be here, but I'll also post the snippet for convenience: https://github.com/Luyten-Orion/Supernovae/blob/main/src/supernovae/api.nim#L11-L12
template respond[T](request: Request, code: int, headers: HttpHeaders, body: T) =
request.respond(code, headers, toJson[T](body))
In a minute I'll create a PR to add the necessary forward declare to alleviate the issue.