<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">By stable ordering, you mean dictionaries with keys being output in the order that they were encoded?<br>
Potentially, but this would require additional work as neither Swift dictionaries nor <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">NSMutableDictionary</code> support this (reasonable seeing as dictionaries are by definition not sorted), and the current implementation uses <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">JSONSerialization</code> as the concrete serializer. Certainly not impossible, though.</p>
<p dir="auto">On 16 Mar 2017, at 8:49, Ben Rimmington wrote:</p>
<p dir="auto"></p></div>
<div style="white-space:normal"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><p dir="auto"><<a href="https://github.com/apple/swift-evolution/pull/640" style="color:#777">https://github.com/apple/swift-evolution/pull/640</a>><br>
<br>
Could the `JSONEncoder.OutputFormatting.prettyPrinted` case include the **stable ordering** of keys?<br>
<br>
-- Ben</p>
</blockquote></div>
<div style="white-space:normal">
</div>
</div>
</body>
</html>