Encoding update data as JSON