> >> I assume people who put “true” binary data into their QByteArrays and >> convert that to JSON would have pre-base64-encoded it manually already, to >> avoid the data loss, so this is a surprising change for those that just use >> it as a poor man’s string. > > Agreed, anyone who needed to send binaries in the past would have encoded > somehow (base16, base64 or base64url), but they might have also already moved > it to QString because that's what's documented. If they haven't -- and > QByteArray::toBase64 returns QByteArray -- then we get double encoding, which > is wore. Thats what is happening here https://github.com/open-eid/chrome-token-signing/issues/168 <https://github.com/open-eid/chrome-token-signing/issues/168> Maybe QByteArray::toHex/Base64 should then return QString instead?
> In a green field scenario, the new behaviour is quite useful. You don't need > to pre-encode, the converter will do it for you. We need then specify how it will then encoded (hex or base64) then. Raul Metsma
_______________________________________________ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development