How to store longer json strings in tag history?

The historian uses VARCHAR(255), or the equivalent of your flavor of SQL. You could try changing that, but its probably not a good idea, especially not if you have partitioning enabled. You could write your data to a table of your own design with scripting.

This thread has some good info that may help:
(Storing Datasets in MySQL Blobs)