When converting XML to JSON, and using an Avro schema to specify what that JSON should look like, how does NiFi handle instances of a single XML child element versus multiple child elements when doing the conversion? For example:
The first employee, John Doe, has two address which NiFi converts to a JSON array, good to go. However, the second employee, Bob Smith, works from home so he has only one address. However, the "address" field is an array so Bob Smith's addresses needs to be a one element array. By using an avro schema during the write operation the, the ConvertRecord processor throws an error when it encounters a record like Bob Smith rather than creating it as a single value array. How do I configure NiFi to use the schema to define the JSON output so I can ensure Bob Smith's addresses are captured as single value arrays?