KB Article #194360

Incorrect or Incomplete Mapping When Using JSON Field Names Containing Special Characters

Problem

When using data maps that map to or from JSON documents containing field names with special characters, some mappings may be missing or incorrectly represented.

The following issues may occur:

  • Input fields whose names contain special characters are not mapped correctly and may be omitted during the mapping process.
  • Output fields containing special characters are renamed, with unsupported characters replaced by underscores (_) instead of preserving the original field names.

Resolution

Internally, all mappings are processed as XML-to-XML XSLT transformations, even when the source or target format is JSON.

To support JSON mapping, an additional conversion layer is applied before and after the XSLT transformation:

  • JSON input is converted to XML before the XSLT mapping is executed.
  • The transformed XML is converted back to JSON after the mapping is complete.

Because XML element names have stricter naming rules than JSON field names, field names containing unsupported characters are sanitized for the JSON ↔ XML conversion. Any character other than ([0-9],[a-z],[A-Z],[.][-][:]) is replaced with an underscore (___):

For example :-Hello@WorldHello_World

As a result:

  • During the XSLT transformation, XPath expressions generated in the mapping designer that reference the original JSON field names containing special characters do not match the sanitized XML element names. Consequently, those fields are treated as missing during the mapping process.
  • During output generation, the sanitized XML element names are converted back to JSON without restoring the original special characters. Therefore, the output JSON contains the sanitized field names (for example, Hello_World) instead of the original names (for example, Hello@World).