toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json['type'] = type;
  json.addAll({
    'samplePeriod': samplePeriod ?? -1,
    'maxStackDepth': maxStackDepth ?? -1,
    'sampleCount': sampleCount ?? -1,
    'timeOriginMicros': timeOriginMicros ?? -1,
    'timeExtentMicros': timeExtentMicros ?? -1,
    'pid': pid ?? -1,
    'functions': functions?.map((f) => f.toJson()).toList(),
    'samples': samples?.map((f) => f.toJson()).toList(),
  });
  return json;
}