JSONByteArrayWriter appears to add a carriage return and line feed between each each JSON element. How can this be removed?
I have run into the same issue. Zigbee2MQTT does not like newline and carrige return. I was hoping it was as easy as a configuration, but I can't find it. I have just done a pass over the string to remove unwanted whitespace.
IF Finalize_JSON THEN // Remove Carrige Return and New Line from json WHILE 0 <> WFIND(payload.str, "$R$N") DO payload.str := WDELETE(payload.str, 2, WFIND(payload.str, "$R$N")); END_WHILE; // Remove triple spaces WHILE 0 <> WFIND(payload.str, " ") DO payload.str := WDELETE(payload.str, 3, WFIND(payload.str, " ")); END_WHILE; Finalize_JSON := FALSE; END_IF;
Log in to post a comment.
JSONByteArrayWriter appears to add a carriage return and line feed between each each JSON element. How can this be removed?
I have run into the same issue. Zigbee2MQTT does not like newline and carrige return.
I was hoping it was as easy as a configuration, but I can't find it.
I have just done a pass over the string to remove unwanted whitespace.