parse diff to json format