ExportMapping - from hierarchical data model to flat JSON (and similar use cases) - Mendix Forum

ExportMapping - from hierarchical data model to flat JSON (and similar use cases)

3

When exposing a data structure – e.g. through a rest service – you sometimes have a normalized data structure but watn to expose the data in a flat JSON.

Should be exposed as

{ “MainLabel”: “value”, “RefName”: “value” }

On export mapping of Main it is only possible to expose the reference as this

{ “Label”: “value”, “Ref” : { “Name” : “value} }

Other services sometimes cannot handle this structure which requires additional microflow logic or other workarounds to convert this json to the flat representation.

It would really help for integrations if it would be possible to skip the ‘Ref’ level and directly get the flat JSON result.
(The opposite direction is already possible in import mappings, i.e. mapping a structured JSON to a flat object).
 

Similarly there are cases where it would help to have an easy way to 

 

regards, Fabian

asked
0 answers