class_docstr: SerDe Mixin for dataclass. dataclasses which can be represented as JSON can implement `SerDe` simply by inheriting this Mixin.
  
  >>> @dataclass
      class DataClassFoo(SerDeDataclassMixin):
          ...
  >>> d = DataClassFoo()
  >>> camphr.serde.to_disk(d, "path/to/save")
class_docstr_tok: ["SerDe","Mixin","for","dataclass",".","dataclasses","which","can","be","represented","as","JSON","can","implement","`","SerDe","`","simply","by","inheriting","this","Mixin",".",">",">",">","@","dataclass","class","DataClassFoo","(","SerDeDataclassMixin",")",":","...",">",">",">","d","=","DataClassFoo","(",")",">",">",">","camphr.serde.to_disk","(","d",",","``","path\/to\/save","''",")"]
docstr: Save self as json.
docstr_tok: ["Save","self","as","json","."]
code: def to_disk(self, path: Path):
      """Save self as json."""
      meta_path = path / self.FILENAME
      meta_path.write_text(json.dumps(asdict(self)))
  
imports: from dataclasses import dataclass, asdict
  import importlib
  import dataclass_utils.error
  import pickle
  from pathlib import Path
  from typing import Any, ClassVar, List, Tuple, Type, TypeVar
  import dataclass_utils
  from typing_extensions import Protocol, runtime_checkable
  import json
label_desc: Use image node_id 1 for calling the SerDeDataclassMixin obj's underlying member method code with example usage: obj.to_disk(path) without return types