haskell-json icon indicating copy to clipboard operation
haskell-json copied to clipboard

Use Map instead of a list of tuple for JsonObject

Open mikeantonacci opened this issue 4 years ago • 0 comments

Import Data.Map.Strict and use Map instead [(String, JsonValue)] for the JsonObject.

As a side effect, duplicate keys are handled in jsonObject by fromList with the same behavior as JavaScript, i.e. "If the list contains more than one value for the same key, the last value for the key is retained."

mikeantonacci avatar May 10 '20 00:05 mikeantonacci