Invalid JSON exported from graph

I would say that this is no nonsense. It is more a problem how data is stored inside the RRD file.
For your use case, i would recommend, that you change the storage properties for this check.
A extended description how the data is stored and consolidated over time you can find here.

For your problem i would recommend the articles “Rates, normalizing and consolidating” and “Minimum, average and maximum”.
Your graph example is already consolidated and this gives you the point numbers.
Without consolidation the “MAX” value should show every time integer numbers.