to and from JSON implemented