Closed pietroppeter closed 7 months ago
You are right, somehow I got convinced you could have any key (I am working on a yaml parser based on this, so things got mixed up ;)), thanks for the remark! I could fix to only allow string and enum as table keys. Suggestions welcome.
fixed to restrict only to string and enum case.
Not sure if the CI failure (failure when testing with js backend) is related to this fix, at the moment I do not have node locally to test it.
I think your PR fails to due to issue: https://github.com/nim-lang/Nim/issues/21317
If CI is approved I would expect it to be green
CI is green and ready to merge if approved
sorry it took a while to address your comment, in the end the code was fine as it was but it took me a moment to realize that (see resolved comment above).
currently jsony can only parse Table with string keys but ~I do not see any problem to allow a generic key~ enum should be fine too. this fixes #52. added two test case for enum, the second of which replicates issue #52 (enum key). edited to remove possibility of generic keys.