I have numbers much lower than zero (p.e. 1.34e-14) that I want to add to a json object. For this, I am using this code:
smallnumber=1.34e-14;
struct json_object *pointj=json_object_new_object();
json_object_object_add(pointj,"par", json_object_new_double(smallnumber);
cout << "\nThe json object created: " << json_object_to_json_string(pointj);
The problem is that the number appear truncated as 0.000000. Is it possible to specify the format of the output to have it in scientific notation?