srjson_t *srjson_CreateNumber(srjson_doc_t *doc, double num) { srjson_t *item = srjson_New_Item(doc); if (item) { item->type = srjson_Number; item->valuedouble = num; // <-- here is correct value item->valueint = (int) num; // <-- here is shrinked value } return item; }
Correct value '4294967295' (max unsigned int), shrinked value is '2147483647' (max int). So we need receive double and put it into unsigned int. Possible the srjson can't correct work with unsigned int and as solution is translate unsigned int through the double.