toJson method
Converts this and returns a Map representing a JSON object.
This allows for easy integration with dart's JsonEncoder class.
Implementation
@override
Map toJson() {
return {
...super.toJson(),
'include': _shouldTreatAsReference ? "#$identifier" : identifier,
};
}