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()
Simple way
import 'dart:convert';
Map<String, dynamic> jsonData = {"name":"vishwajit"};
print(JsonEncoder().convert(jsonData));