parse static method
Implementation
static SchemaNode parse(dynamic input) {
dynamic json = input;
// If input is a string, decode it first
if (input is String) {
try {
json = jsonDecode(input);
} catch (e) {
throw SchemaParserException('Invalid JSON string: $e');
}
}
// Create SchemaNode from the decoded JSON
return SchemaNode.fromDynamic(json);
}