-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
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
Question: Nested bean serialization (Example: Minecraft chat) #55
Comments
Probably the combination of bean type with collection isn't supported. I'll cook up a test case and will try to implement it. :) |
Initial analysis: as assumed, support for collections isn't great. The entire "extra" field is not split further and exported as SnakeYAML does by default. And that is exactly this: - !!ChatComponent
color: yellow
extra: null
text: inner which explains the weird output and the wrong indentation. So what I need to do is be aware of the collection type and generically decide whether it needs to be visited further, or if it's OK to export the entries directly (e.g. for string list). |
No not really. I have a lot of other things which I can work on ;) |
This works a lot better since the refactoring, though I've found some weird behavior in the export of Optional properties. |
…serialization - Empty optionals were being exported as empty maps because there was no way during the export value generation to signal that null should be used as the value. Also while gathering values to put into maps null values were not being skipped. - Add more complicated examples of beans nested into each other to fully cover #55. The actual bug has been fixed during the large refactoring of #56
I close this now seeing as some complicated test cases pass with the new structure of ConfigMe. Please share a sample if there is still an issue and I'll look into fixing it. |
Minecraft chat uses JSON. This allows advanced chat formatting like specifying hover and click events. I'm trying to build the same thing in YAML to make use of comments and migration services.
Example YAML. (Valid YAML according to Online-Parser):
But if I try to save it with the Bean example. It builds something like this below.
Output
Bean:
Settings class
The text was updated successfully, but these errors were encountered: