Converts map tree to a JSON.
map
Map<String, dynamic> mapToJson(Map map, {bool duplicatedEntitiesAsID = false, bool? autoResetEntityCache});