using JSON files vs YAML for host vars

Is it possible to use a JSON file instead of writing the file as YAML? Will Ansible use the two interchangeable or do you need to provide an additional setting when it’s called from Ansible-play?

In my Host Vars file could I have something like this?

{

“ETHERNET_TRUNK”: {

“PORT”: [

“1/1”

]

}

}

Vs. making the file support YAML instead?

JSON is a subset of YAML, so the YAML parser will be able to understand it.

Great, Thanks!