When we serialize messages into JSON, we convert field IDs from ints into strings and then sort them using OrderedMap. Here is an example of what we may get when we have 17 and 107 as IDs:
I think that we may keep OrderedMap as is for numeric IDs (when we use it in message) and just use default JSON marshalling for a composite field without sorting. Or, we may add OrderedStringMap in addition to Ordered(Int)Map for the composite field.
When we serialize messages into JSON, we convert field IDs from ints into strings and then sort them using
OrderedMap
. Here is an example of what we may get when we have 17 and 107 as IDs:{ "0":"0100", "1":"D00080000000000000000000002000000000000000000000", "107":"102", "17":"101", "2":"4242424242424242", "4":"100" }
I think that we may keep OrderedMap as is for numeric IDs (when we use it in message) and just use default JSON marshalling for a composite field without sorting. Or, we may add
OrderedStringMap
in addition toOrdered(Int)Map
for the composite field.It was changed here: https://github.com/moov-io/iso8583/pull/121/files#r706258805