Fix JSON and YAML tests if the defaults have been tweaked (RT#98824)

Some people tweak their JSON (or YAML) modules to format things
differently by default, so roundtrip the expected data through a
load/dump to make sure it's formatted thes same.