The latest smooks-json-cartridge docs have a mistake which I've corrected now. The attribute name is arrayElementName
; not elementName
. I'd say you can achieve what you want in a Smooks pipeline
and then escape to Java for transforming the names as shown in this comment: https://github.com/smooks/smooks-csv-cartridge/issues/43#issuecomment-825807741
. You could also perhaps delegate transformation to another library more suited for this task rather than writing the transformation code yourself. Readers like json:reader
are usually designed for digestion rather than transformation but you can always extend the reader.