How to rediscover deleted MQTT devices

Yes in JSON. No there’s no preference for YAML over JSON in general. Maybe this topic will shed some light to the dark.

Basically the configuration for integrations will slowly move from YAML to UI only, there are already lots of integrations, which can only be configured through the UI. This condig will then be written as JSON to the storage files and they are not meant to be edited. Scripts, automations etc. will continue to work through YAML and automations that you create through the UI will be stored in YAML format (with some non-sense sorting and comment removing magic stuff) in automations.yaml.