Qualifiers are serialized as a key-value pair with the key being the property id of the qualifier and the value being an array of serialized values (an array because the same qualifier can be used several times).

The different snaks are represented through the value serialization. This allows for the qualifiers to be key-value pairs.