CroatiaControlLtd/asterix

Duplicate JSON keys for I062/510 Composed Track Number

Closed this issue · 2 comments

This looks similar to #104 which affects I048/030, I'm reporting it so that any future fix can also be verified against I062/510. If there is more than one extent in I062/510, there are duplicate keys in JSON output, for example:

 "I510":{
        "SDPSUID":115,
        "STN":500,
        "FX":1,
        "SDPSUID":115,
        "STN":1019,
        "FX":0}

When I unmarshal this into a data structure, only the last value for any given key is taken and all previous values are discarded, in this particular example SDPSUID = 115, STN = 1019, FX = 0. Is there any way this could be output as an array or a map? Something like

"I510": [{
        "SDPSUID": 115,
        "STN": 500,
        "FX": 1
        }, {
        "SDPSUID": 115,
        "STN": 1019,
        "FX": 0
        }]

Sample capture:
i062-510.zip

This should be fixed now. Please pull the master source and try it.

The fix looks good for CAT062 ver 1.18. For other versions it works but only after the extra fixed field is removed from config as per attached.
062-510-config.zip