| 103 | } |
| 104 | |
| 105 | CJSON_PUBLIC(double) cJSON_GetNumberValue(cJSON *item) |
| 106 | { |
| 107 | if (!cJSON_IsNumber(item)) |
| 108 | { |
| 109 | return NAN; |
| 110 | } |
| 111 | |
| 112 | return item->valuedouble; |
| 113 | } |
| 114 | |
| 115 | /* This is a safeguard to prevent copy-pasters from using incompatible C and header files */ |
| 116 | #if (CJSON_VERSION_MAJOR != 1) || (CJSON_VERSION_MINOR != 7) || (CJSON_VERSION_PATCH != 13) |