toJson abstract method
Converts this Constant object to a JSON representation.
constants
needs to be passed, as the Constants are normalized and
stored separately in the JSON.
Implementation
Map<String, Object?> toJson(Map<Constant, int> constants);