RichNode.fromJson constructor

RichNode.fromJson(
  1. Map<String, dynamic> json,
  2. String path
)

Implementation

factory RichNode.fromJson(Map<String, dynamic> json, String path) {
  return RichNode(
    type: req<String>(json, 'type', path),
    attrs: RichAttrs.fromJson(object(json, 'attrs', path) ?? const {}),
    marks: _marksFrom(json),
    text: opt<String>(json, 'text'),
    children: _childrenFrom(json, path),
  );
}