Off-by-one error in the json interval calculation.
Merge branch 'write-json-files' into oversampling