fromJsonString<T> static method
NodeGraph<T>
fromJsonString<T>(
- String jsonString,
- T fromJsonT(
- Object? json
- Annotation annotationFromJson() = defaultAnnotationFromJson,
Convenience method to load graph from JSON string
Implementation
static NodeGraph<T> fromJsonString<T>(
String jsonString,
T Function(Object? json) fromJsonT, {
Annotation Function(Map<String, dynamic> json) annotationFromJson =
defaultAnnotationFromJson,
}) {
final Map<String, dynamic> json = jsonDecode(jsonString);
return NodeGraph<T>.fromJson(
json,
fromJsonT,
annotationFromJson: annotationFromJson,
);
}