toJson method

String toJson()

Implementation

String toJson() {
  var x = '';
  var y = '';

  _fields.forEach((element) {
    x += ', {';
    y = '';
    element.forEach((key, value) {
      y += ', ${jsonEncode(key)}: ${value.toJsonValue()}';
    });
    x += y.replaceFirst(', ', '') + '}';
  });

  x = x.replaceFirst(', ', '');
  return '[$x]';
}