I think you’re looking for something like this:
<AimmsJSONMapping>
<ObjectMapping>
<ObjectMapping name="DeviceData">
<ValueMapping name="minimumMired" maps-to="minimumMired"/>
<ValueMapping name="maximumMired" maps-to="maximumMired"/>
<ValueMapping name="numberOfPWMChannels" maps-to="numberOfPWMChannels"/>
</ObjectMapping>
<ArrayMapping name="FluxConnectivityTable" iterative-reset="1">
<ArrayMapping iterative-binds-to="fc1" iterative-reset="1">
<ValueMapping iterative-binds-to="fc2" maps-to="FluxConnectivity(fc1,fc2)" force-dense="FluxConnectivityDomain(fc1,fc2)"/>
</ArrayMapping>
</ArrayMapping>
<ArrayMapping name="LedParams" iterative-reset="1">
<ObjectMapping iterative-binds-to="lp1">
<ValueMapping name="Vf" maps-to="LP_Vf(lp1)" force-dense="LP_VfDomain(lp1)"/>
<ArrayMapping name="R" iterative-reset="1">
<ValueMapping iterative-binds-to="lp2" maps-to="LP_R(lp1,lp2)" force-dense="LP_RDomain(lp1,lp2)"/>
</ArrayMapping>
</ObjectMapping>
</ArrayMapping>
</ObjectMapping>
</AimmsJSONMapping>
This works together with the following declarations in your model:
DeclarationSection DeviceData {
Parameter minimumMired;
Parameter maximumMired;
Parameter numberOfPWMChannels;
Set FluxConnectivitySet1 {
Index: fc1;
}
Set FluxConnectivitySet2 {
Index: fc2;
}
Parameter FluxConnectivity {
IndexDomain: (fc1,fc2);
}
Parameter FluxConnectivityDomain {
IndexDomain: (fc1,fc2);
Definition: 1;
}
Set LedParamSet1 {
Index: lp1;
}
Set LedParamSet2 {
Index: lp2;
}
Parameter LP_Vf {
IndexDomain: lp1;
}
Parameter LP_VfDomain {
IndexDomain: lp1;
Definition: 1;
}
Parameter LP_R {
IndexDomain: (lp1,lp2);
}
Parameter LP_RDomain {
IndexDomain: (lp1,lp2);
Definition: 1;
}
}
I tested this to work properly with your given input json file, and writing back the data will generate the same json file.
The entries for the “force-dense” attribute are there to make sure that output is also generated when the corresponding identifiers hold default values. They are of no consequence when reading the data.