Is there any method to convert JSON files into cadyyfiles

Nope. Caddyfile to JSON is a one-way conversion. It’s “lossy”; for example, the concept of “sites” does not exist in JSON, it’s something that’s provided as a shortcut in the Caddyfile.