Currently the MapData uses an unordered map and a vector, this is likely used to keep the insertion order, however there is no requirement the results should be in a specific order (at least changing this breaks the tests, that expects the JSON serialization to be equal, instead of comparing the objects).
However this is resulting in 2 strings to be created, plus the extra indirections to get the pairs.
Could we change the MapData to be a std::map and fix the tests?