Source code for hashtron.classifier.view

import json

[docs] class HashtronView: def __init__(self, hashtron): self.hashtron = hashtron
[docs] def write_json(self) -> str: return json.dumps(self.hashtron.program)
[docs] def read_json(self, b) -> None: self.hashtron.program = json.loads(b)