MCPcopy Create free account
hub / github.com/MemTensor/MemOS / from_json_file

Method from_json_file

src/memos/configs/base.py:44–48  ·  view source on GitHub ↗

Load configuration from a JSON file.

(cls, json_path: str)

Source from the content-addressed store, hash-verified

42
43 @classmethod
44 def from_json_file(cls, json_path: str) -> Any:
45 """Load configuration from a JSON file."""
46 with open(json_path, encoding="utf-8") as f:
47 data = f.read()
48 return cls.model_validate_json(data)
49
50 def to_json_file(self, json_path: str) -> None:
51 """Dump configuration to a JSON file."""

Callers 5

from_local_configMethod · 0.80
init_from_dirMethod · 0.80
test_from_json_fileFunction · 0.80

Calls 1

openFunction · 0.50

Tested by 1

test_from_json_fileFunction · 0.64