You can represent all the expected types with an enum that will determine which 
field of your object is the valid one. To reduce object's size (probably 
doesn't matter), there are object variants 
[https://nim-lang.org/docs/manual.html#types-object-variants](https://nim-lang.org/docs/manual.html#types-object-variants)

For completely dynamic types there is 
[https://nimble.directory/pkg/variant](https://nimble.directory/pkg/variant)

Reply via email to