YAML can be pleasant for human-edited configuration, but the target application must actually accept it. JSON is usually simpler for APIs and exact machine interchange. Choose the format required by the next consumer, not the one that merely looks shorter.
After using a JSON–YAML converter, inspect the parsed values: strings resembling dates or numbers, nulls, nested arrays, Unicode, and escaped newlines deserve attention. Check duplicate keys and run the destination application's validator. A syntactically valid YAML file can still have the wrong schema or surprising types.
Keep the original JSON until the converted data has been tested.