Hi @whkarto,
The Quick Translator will set the output schema to match the input, but the TOPOLOGIE array is converted to a list on reading, and the GeoJSON writer cannot write list attributes, so it does not come through on the conversion.
In order to retain the TOPOLOGIE structure, we need to explode the list and rebuild the JSON structure in a JSONTemplater. Then we can write the TOPOLOGIE structure as a json type attribute on the output feature. This is fairly simple, since we only need to create the TOPOLOGIE structure in the templater, not the entire GeoJSON feature.
We will also need to set the GeoJSON writer File Structure parameter to Object with feature type names as keys, to match your source file.
I am attaching a workspace that will successfully roundtrip your sample file.
Hi @whkarto,
The Quick Translator will set the output schema to match the input, but the TOPOLOGIE array is converted to a list on reading, and the GeoJSON writer cannot write list attributes, so it does not come through on the conversion.
In order to retain the TOPOLOGIE structure, we need to explode the list and rebuild the JSON structure in a JSONTemplater. Then we can write the TOPOLOGIE structure as a json type attribute on the output feature. This is fairly simple, since we only need to create the TOPOLOGIE structure in the templater, not the entire GeoJSON feature.
We will also need to set the GeoJSON writer File Structure parameter to Object with feature type names as keys, to match your source file.
I am attaching a workspace that will successfully roundtrip your sample file.
Sorry for my late answer, I managed to solve the problem via the JSON Templater. Fore sure this is the prefered solution but it is still somehow strange to me that I can't loop this dataset through FME doing a Quick Translation. Especially as the list created by FME JSON Reader does include both attributes and nested structure.