toJson method

Map<String, Object?> toJson()

Encodes this value to its wire object.

Implementation

Map<String, Object?> toJson() {
  final result = <String, Object?>{};
  result['resource'] = embeddedResourceResourceCodec.encode(resource);
  if (annotations != null) {
    result['annotations'] = annotationsCodec.encode(annotations!);
  }
  if (meta != null) {
    result['_meta'] = meta!.toObject();
  }
  return result;
}