您如何使用 简单 XML 序列化地图,使其看起来像:
<elem foo="value">key</elem>
而不是正常
<elem foo="key">value</elem>
(地图是一对多,并且由于这将由人类编辑,我希望它更清晰。)
[编辑]: 不修复。
How would you go about serialising a Map using simple XML so that it looks something like:
<elem foo="value">key</elem>
Instead of the normal
<elem foo="key">value</elem>
(The map is one to many, and since this will be edited by humans, I wanted it to be clearer.)
[EDIT]: Doesn't Fix.
发布评论
评论(1)
您是否尝试过类似的操作:
或某种组合,即使用 @ElementMap 注释也 吗?
Have you tried something like:
or some combination, i.e. to use the other attributes of the @ElementMap annotation too?