#include <ucw-json/json.h>
#include <float.h>
-#include <math.h>
#include <stdio.h>
void json_set_output(struct json_context *js, struct fastbuf *fb)
else if (u < 0x110000)
bprintf(fb, "\\u%04x\\u%04x", 0xd800 + ((u - 0x10000) >> 10), 0xdc00 + (u & 0x3ff));
else
- ASSERT(0);
+ bprintf(fb, "\\u%04x", UNI_REPLACEMENT);
}
else
bput_utf8_32(fb, u);
static void write_number(struct fastbuf *fb, double val)
{
- ASSERT(isfinite(val));
bprintf(fb, "%.*g", DBL_DIG+1, val);
}