Previously cJSON generated invalid JSON when a number was infinite or similar. This patch changes the behaviour to match javascript, that is to render such a number as null.