Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- type
- Person = object
- user_id: string
- custom_user_id: string
- let jsonNode = parseJson("""
- {
- "user_id": "123"
- }
- """)
- var data = to(jsonNode, Person) # Error: unhandled exception: key not found: custom_user_id [KeyError]
- echo data
Advertisement
Add Comment
Please, Sign In to add comment