”The response should be a JSON object mapping Emoji (as Strings) to their count (as Numbers)”
This means ordering semantics are lost.
This means ordering semantics are lost.
But lots of fun being had in our Slack by people putting emojis in the right order, to make pictograms etc
All forms of communication is "abused", such abuse is part of being human, that is how languages have evolved..
It’s also worth noting that quite a few languages don’t guarantee ordered maps either.
If you want an ordered map then you really need a key/value map inside an array:
[
{
Key: “:thumb:”,
Value: 4
},
{
Key: “:smile:”,
Value: 1
}
]
Though in this specific instance, you’d be better off with more specific key names like “emoji” and “count” (respectively).Edit: HN stripped the emojis from my comment so I added ASCII placeholder strings into the example to illustrate the same point.