toJson abstract method

Map<String, Object?> toJson(
  1. Map<Constant, int> constants
)

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);