title: How can I JSON.stringify a Collection in Dart
body: <p>How can I made a JSON string out of a collection in dart, as I can do it with Maps. The docs say I can pass a map or a an array into the <code>JSON.stringify()</code> method. But there are no Array data type in Dart and passing a collection gives me an exception. </p>
  
  <p>I've a naive workaround, but I wonder if there will be a better way to do this:</p>
  
  <pre><code>    String s = '[';
      bool first=true;
  
      _set.forEach(function(item){
        if (first) {
          first = false;
        } else {
          s+=',';
        }
        s += JSON.stringify(item);
      });
      s +=']';
      print(s);
      return s;
  </code></pre>