parse method
Parses the given source
string into a Map<String, dynamic>
.
Implementations must:
- Convert the raw string into structured key-value pairs.
- Return a valid map representation.
- Throw a FormatException if parsing fails due to invalid syntax or unexpected input.
Example:
final config = parser.parse('{"debug": true}');
print(config['debug']); // true
Implementation
Map<String, dynamic> parse(String source) => throw ParserException('Parser does not support parsing strings');