very much work in progress on write functionality for the json tp