@cryptotaxi247 / netdata-1 / commits / 35d84e172

User proper JSON for /api/v1/data

This fixes issue #83 The output with options=google_json does not change

Simon Nagl committed Feb 4, 2017 at 14:04 UTC 35d84e172d9dd8bd33132432d3881c941342daa4
1 file changed +5 -5
src/rrd2json.c
+5 -5
@@ -918,14 +918,14 @@ static void rrdr2json(RRDR *r, BUFFER *wb, uint32_t options, int datatable)
918 else {
919 kq[0] = '"';
920 sq[0] = '"';
921 - if((options & RRDR_OPTION_SECONDS) || (options & RRDR_OPTION_MILLISECONDS)) {
922 - dates = JSON_DATES_TIMESTAMP;
923 - dates_with_new = 0;
924 - }
925 - else {
921 + if(options & RRDR_OPTION_GOOGLE_JSON) {
922 dates = JSON_DATES_JS;
923 dates_with_new = 1;
924 }
925 + else {
926 + dates = JSON_DATES_TIMESTAMP;
927 + dates_with_new = 0;
928 + }
929 if( options & RRDR_OPTION_OBJECTSROWS )
930 strcpy(pre_date, " { ");
931 else