Yeah, but yaml is a superset of json, so you can always transform between the two, locally. Just can't expect relays to use it.
Discussion
A client could do that. It adds a translation layer, which has tradeoffs, and whether those are worth it is up to the dev.