This is a not exactly a question about node red, but since this community is also expert in related fields, perhaps someone can answer anyway.
I've been playing around with mosquitto_pub and an example from thingsboard:
MQTT Device API Reference | ThingsBoard Community Edition
mosquitto_pub -d -h "demo.thingsboard.io" -t "v1/devices/me/attributes" -u "$ACCESS_TOKEN" -m "{"attribute1": "value1", "attribute2": true}"
What I don't understand is how un-escaped quotes works in the message (-m flag). It doesn't escape the quotes inside json, nor does it encapsulate with single quotes. Yet this works directly from linux terminal? Chatgpt insists this is not possible, and either the copied text is not the same (something I can't observe, because pasting it in notepad shows it as identical), or that the terminal somehow magically escapes it when pasting (also not the case)?
Perhaps mosquitto is being nice and automatically handles this? But that's kinda unusual behavior for cli programs? Chatgpt also denies this...