New parse_string cJSON code from upstream.