-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
import eminim, streams
type Component = ref object of RootObj
type Move = ref object of Component
speed: float32
let s = newStringStream("""{"speed":20}""")
let a = Move(s.jsonTo(Component))
echo a.speedFrom the marshal module docs:
Restriction: For objects, their type is not serialized. This means essentially that it does not work if the object has some other runtime type than its compiletime type.
Metadata
Metadata
Assignees
Labels
No labels