samson
samson copied to clipboard
Support for unmarshalling to reference types
Is it planned to implement support for unmarshalling to reference (ref object
) types? Example based on the README:
import samson
type User = ref object
name: string
age: range[0..high(int)]
let input = """
[
{"name": "John Doe", age: 25},
{"name": "Jane Doe", age: 22, timezone: "Europe/Stockholm"}
]
"""
let parsed = fromJson5(input, seq[User])
Currently this fails with : "Unsupported type: User".