clearing JSON object after succesful commit