toJson method

Map<String, dynamic> toJson()

NOTE: parent is excluded from JSON output on purpose to prevent cyclic traversal of the object graph (parent -> child -> parent -> ...), which causes stack overflows. Only downward links (children) are serialized. Parent links are restored after fromJson runs _rebuildParentReferences().

See: @JsonKey(includeFromJson: false, includeToJson: false) on parent (including its getter) and DartBlockEnvironment.fromJson.

Implementation

Map<String, dynamic> toJson() => _$DartBlockEnvironmentToJson(this);