Skip to content

Unsigned long printed as long #170

Closed
@pinps

Description

@pinps

Hi,
I am trying to print an unsigned long value ID on Arduin Uno, but it seems to print it as a long:
Code:
void setup() {
Serial.begin(9600);
StaticJsonBuffer<200> jsonBuffer;
JsonObject& root = jsonBuffer.createObject();
root["id"] = 2345678901;
root.printTo(Serial);
}
Output:
{"id":-1949288395}

Do I need to specify some how it is an unsigned or how to fix this behavior?

-Pinps

Metadata

Metadata

Assignees

Labels

bugv5ArduinoJson 5

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions