toJson method
Implementation
Map toJson(){
Map _result = {};
if (data != null) _result.addAll({"data": data});
if (friendlyName != null) _result.addAll({"friendlyName": friendlyName});
_result.addAll({"attributes": attributes});
return _result;
}