Added Export history to JSON function

One thing I could not figure out is the utf-8 labels (ie. the ones I
fixed in csv export)

It keeps reverting the utf-8 to ascii and Japanese characters are
reverted to \u<bytes> codes in the json file.