mobizt / Firebase-ESP32

[DEPRECATED]🔥 Firebase RTDB Arduino Library for ESP32. The complete, fast, secured and reliable Firebase Arduino client library that supports CRUD (create, read, update, delete) and Stream operations.
MIT License
415 stars 118 forks source link

ENHANCEMENT #146

Closed petkomatus closed 3 years ago

petkomatus commented 3 years ago

Can you help me send a message to Firebase.setString (fbdo, "message", "/"Arduino\nESP32/"");

i don't know about the top ride

Well thank you

mobizt commented 3 years ago

I don't see any problem. If you want to construct string from hard code the character inside quotes e.g. "your string" and your string contains quote " you should make a escape string by place \ before " e.g.

String str = "abcde \"fghi\" jklmn";

It will interpret as abcde "fghi" jklmn.

petkomatus commented 3 years ago

i need to send to firebase in this shape Screenshot 2021-02-19 13 41 50

mobizt commented 3 years ago

You should search Google for escape sequence string.

Test it by print to serial before sending.

String s1 = "\"Arduino\nESP32\"";

Serial.println(s1)

This will pint
\"Arduino ESP32\"

String s2 = "\\\"Arduino\\nESP32\\\"";

Serial.println(s2)

This will pint
\"Arduino\nESP32\\"

petkomatus commented 3 years ago

well thank you