We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How I would go about decoding JSON into arbitrary structs? e.g.:
Poison.decode!(~s([ {"type": "giraffe", "args": {"height": 400, "age": 27}}, {"type": "turtle", "args": {"height": 30, "age": 108}} ]), as: [%type{}???])
Where type is arbitrary but one of a finite number of defined structs, and args are the fields for that struct.
The text was updated successfully, but these errors were encountered:
You mean as if the data define the type of struct to be used?
Sorry, something went wrong.
This is the way: #207
No branches or pull requests
How I would go about decoding JSON into arbitrary structs? e.g.:
Where type is arbitrary but one of a finite number of defined structs, and args are the fields for that struct.
The text was updated successfully, but these errors were encountered: