I want to create a group of elements in a message as shown below.
Updated:
case class Element(key:String;value:String)
The message can be presented approximately as
case class Msg(field1:Element,field2:Group)
Group
β is a repeating group - I need help identifying a group and sub group
The element defines the combination key = value , which is repeated in groups
Below are some points
Are field attributes of FixMessage?
-Yes, they are attributes of the Fix message, and each field is represented as a case class Element(key:String;value:String)
Repeating group they Element
repeat no of times
Are keys and values ββfor all strings?
-See them as a string at the moment
Field N (field 1, field 2, etc.) represents different types?
Yes, they represent it as different types of data. But now we can take them as the same data type to make it simple.
Exit:
key2 = value2 ; key3=value3;key4=value=4;key3=value3;key4=value=4
; key2 = e2 value; key3=value3;keyββ4=value4;key3=valueββ3;key4=value4
Explaination
The group key2=value2
repeated 2 times. The subgroup key3=value3;key4=value=4;key3=value3;key4=value=4
, which is a repeat of 2 times in each group ( key2=value2
), respectively
source share