dart map to json string

JavaScript
import 'dart:convert';
...
json.encode(data); // JSON.encode(data) in Dart 1.x

Source

Also in JavaScript: