Unsorted Multi Map

Abstract TypeDerivation MarkerContainer TypeElementsDistinctSorted
unsorted-multimapcontainer markerobjectpairsnono

The abstract base type unsorted multi map (unsorted_multimap) is a sequence of key-value pairs (potentially with duplicate pairs, and duplicate keys). This sequence has no special sorting its elements.


JSON Snippet


Encoding with Base Type object

A (compacted) Carbon unsorted-multimap for the JSON snippet from above, encoding the JSON object with the base type object holding four string properties.

	(1)[x] [s](1)[y]
	(1)[x] [s](1)[y]
	(1)[a] [s](1)[c]	
	(1)[a] [s](1)[b]

JSON Standard Notes. Note that JSON (RFC 8259) does not restrict an object to unique keys or unique pairs. However, most JSON libraries reject objects with duplicate keys. For these libraries, use the derived abstract type sorted-map or unsorted-map.