How to serialize map with dynamic value type #277
Unanswered
stefanozanella
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'm trying to model the class hierarchy to be able to generate a TOML file like the following:
The entries inside the table are dynamic based on user input, so I can't statically add fields to a class representing the table.
Originally I thought of using a
Map<String, Any>
butAny
is not a valid serializable type. An interface implementation would also help I guess but I can't have a string implement a custom interface.Does anyone have any idea how I could solve this problem?
Beta Was this translation helpful? Give feedback.
All reactions