serialize/deserialize JSON/Dict to/from smithy auto generated models #617
Unanswered
brianrundle
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a smithy definition and need to be able to serialize/de-serialize JSON/Dict to/from smithy auto generated classes. But these models don't come with from_dict/to_dict methods.
The googles suggest I need to create a custom method for this conversion since I'm not using the 'client' to instantiate the classes all the time. Maybe using attr has spoiled me, but I would think to_dict/from_dict would be a default feature of the auto generated classes.
I'm digging into creating some kind of utility companion for this, but I can't help thinking I'm re-implementing something or missing something when I ran: smithy build to generate the models.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions