feat: accept single value as list#721
Conversation
|
This issue has been automatically marked as stale because it has not had any activity in the last 60 days. It will automatically be closed if no further activity occurs in the next seven days to enable maintainers to focus on the most important issues. |
8cce1a3 to
f36e8f9
Compare
|
I manage to run the tests, all yaml reading tests are passed.
@charleskorn Would you like to have a look? |
|
Is there a reason why this needs to be implemented in Kaml rather than implemented as a custom serializer in your application? |
My original intention to do this is to implement the same feature as Jackson. There are many "single values" I need to accept them as list in the data I want to deserialize. Some data are cloned from upstreams and I connot control the format. And If I want to deserialize a field as UPDATE: YAML 1.2 specification does not allow it, but many parsers (such as Jackson) support it as a convenience feature that can be manually enabled or disabled for backward compatibility and usability, since YAML 1.1 specification allows this kind of implicit conversion. |
@charleskorn Recently I try to implement such kind a custom serializer and found that the (de)serialization will not (de)serailize the field with my custom serializer even I've specified it to the class or the field. I have no idea if it's a bug or I've made a mistake. |

(I connot run the test for "No JDK specified" exception, even I've specified, sorry)