Created
February 14, 2018 11:37
-
-
Save develar/b58ec9a6493a5a7584d131401771b270 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Please consider to use annotation parameters only to achieve backward compatibility. Otherwise feel free to file issues about serialization cosmetics. | |
## Lists and Sets | |
`XCollection` annotation intended to customize lists and sets serialization. | |
Two styles are provided: | |
* `v1`: | |
```xml | |
<option name="propertyName"> | |
<option value="value1" /> | |
<option value="valueN" /> | |
</option> | |
``` | |
* `v2`: | |
```xml | |
<propertyName> | |
<option value="$value" /> | |
</propertyName> | |
``` | |
Where `option` it is item element (use `elementName` to customize element name) and | |
`value` it is value attribute (use `valueAttributeName` to customize attribute name). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment