Bug in IDE : using json in string

Hi Guys,

Thank you for catching this, you're absolutely right this is a compiler pre-processor bug. It looks like the compiler thinks the "//" is a comment, and it strips it out of the program:

this:

void loop() {
    Serial.println("POST http://172.16.0.33:8000/api/v1/devices/register HTTP/1.1");
}

becomes:

void loop() {
    Serial.println("POST http:
}

I'm adding this to our bug list for the compiler, and hopefully I'll get a chance to patch it this weekend. Sorry about that. If you split your slashes then it should ignore it as a workaround.

Thanks,
David

1 Like