This repository has been archived by the owner on Aug 23, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix json encoding of NaN/nulls. fix #66
otherwise we would see errors like `json: error calling MarshalJSON for type main.Point: invalid character 'N' looking for beginning of value` the data can contain NaN values, i verified they were not coming from or stored in the chunks, but happened in divide(), like when we did 0/0. Graphite-web has some special cases in divideSeries() but we don't need to, we can just use NaN in the data arrays and execute our logic/math as usual, this works fine in Go, we just need to encode them properly. for the record, in the official json encoder, NaN/null isn't even supported: golang/go#3480
- Loading branch information