I've done something similar for my plugin system, except with JSON. I use a 
macro to create a wrapper function for any nim function which then takes a 
JsonNode and returns a JsonNode and does the conversion. The code ain't pretty 
but maybe it helps: 
(<https://github.com/Nimaoth/Absytree/blob/3cf24e7dcb218310edc17a2bd4b3d12d7ab09fea/src/misc/wrap.nim#L7>)

Reply via email to