Serialization of EACH aggregations

When performing lookups, data collect by *_EACH aggregations may be serialized in the response in one of two distinct ways:

  • Serialized Map: In this format, data is converted into a linear representation, such as a string or binary data.

{
  "key1": "value1",
  "key2": "value2",
  "key3": "value3"
}
  • List of Key-Value Pairs: This involves any collection of pairs where each pair is comprised of a unique key associated with a corresponding value.

[
  {
    "key": "key1", 
    "value": "value1"
  },
  {
    "key": "key2", 
    "value": "value2"
  },
  {
    "key": "key3", 
    "value": "value3"
  }
]

The format of the data is determined by the type of group key employed. If a string is used as the group key, the serialization will adopt the map structure. Conversely, if a non-string type (such as a number) is utilized, the serialization will adopt the key-value pairs structure.

Last updated