Sine curves and JSON posting to API