toJson method
Returns the data fields of PolyGeofence in JSON format.
Implementation
Map<String, dynamic> toJson() {
return {
'id': id,
'data': data,
'polygon': polygon.map((e) => e.toJson()).toList(),
'status': _status,
'timestamp': _timestamp
};
}