Dart: convert Map to JSON with all elements quoted

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

always resulted in quoted JSON for me.
You don’t need to call toString()

Leave a Comment