Skip to content

Commit 5ab1292

Browse files
committed
Update documentation to clarify how names are derived from serialnames.
"Fixes" issue #50.
1 parent c8a7df8 commit 5ab1292

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ Mixed. Mixed is a special type that allows for mixing of text and element conten
124124
- Otherwise it will be written as a tag
125125

126126
### Tag/attribute name
127+
The way the name is determined is configured/implemented through the configured policy. The documentation below
128+
is for the default policy. This is designed to allow customization by users.
129+
127130
Based upon the storage type, the effective name for an attribute is determined as follows:
128131
- `@XmlSerialName` at property declaration site
129132
- `@XmlSerialName` at type declaration site
@@ -144,6 +147,13 @@ The effective name for a polymorphic child is determined as follows:
144147
the serial name of the type (shortened to share the package name with the container). The value will use the default
145148
name `value`.
146149

150+
The implementation if serialization in the Kotlin compiler does not allow distinguishing between the automatic name and
151+
a `@SerialName` annotation. The default implementation supposes that if there is a '`.`' character in the name, this is
152+
a java type name and it strips the package out. (This also when it could be an attribute).
153+
154+
If you need to support names with dots in your format, either use the `@XmlSerialName` annotation, or use a
155+
different policy.
156+
147157
## Annotations
148158

149159
| Annotation | property | description |

0 commit comments

Comments
 (0)