implemented to JSON and from JSON
Note persistence complete (?) maybe.