Changed write statement in postTwT to write json.