If a double value of 8.13 is passed into json_real and dump the json i see that its printing 8.1300000000000008, Is there any way to get 8.13 or 8.13000000000000000 exactly in C?
double test = 8.13;
json_t* msgtest = json_object();
json_object_set_new(msgtest, "test", json_real(test));
char* msgStr;
msgStr = json_dumps(msgtest, 0);