Skip to content

Configuration to control array element names #22

@lbovet

Description

@lbovet

Currently, array elements are named after the JSON schema name.
In order to control or avoid using type names in the XML instances, it should be possible to choose how these elements are named.

Proposal
Config.mapArrayElementNames(Function<String,String> mapper)
default is the identity function

Examples
If one wants names in camelCase:
cfg.mapArrayElementNames(name -> name.substring(0, 1).toLowerCase() + name.substring(1))

If one wants to use "item" everywhere:
cfg.mapArrayElementNames(name -> "item")

You can assign to me. It will be shortly done and can be included in 2.2.0.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions