title: what is a good way to test parsed json maps for equality?
body: <p>The following code prints:</p>
  
  <pre><code>false
  false
  true
  {{a: b}, {a: b}}
  </code></pre>
  
  <hr>
  
  <p><strong>code</strong></p>
  
  
  
  <pre class="lang-dart prettyprint-override"><code>import "dart:json" as JSON;
  
  main() {
    print(JSON.parse('{ "a" : "b" }') == JSON.parse('{ "a" : "b" }'));
    print({ "a" : "b" } == { "a" : "b" });
    print({ "a" : "b" }.toString() == { "a" : "b" }.toString());
    Set s = new Set();
    s.add(JSON.parse('{ "a" : "b" }'));
    s.add(JSON.parse('{ "a" : "b" }'));
    print(s);
  }
  </code></pre>
  
  <p>I am using json and parsing two equivalent objects, storing them in a Set, hoping they will not be duplicated. This is not the case and it seems to be because the first two lines (unexpectedly?) results in false. What is an efficient way to correctly compare two Map objects assuming each were the result of JSON.parse()?</p>