YAMLEncoderだと ou: relative: https://www.apple.com u: relative: https://www.apple.com で、どっちも辞書型になる。 (edited)JSONEncoderはURLを文字列としてエンコードする様に特別扱いして、URLのCodable実装を迂回してる。 https://github.com/apple/swift/blob/master/stdlib/public/SDK/Foundation/JSONEncoder.swift#L691URLのCodable実装を迂回する様にしないと、上手くいかないはず。 (edited)