From 56df9e5603b33d0fe6264c185030785b5587f8b6 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 5 May 2023 18:37:10 +0200 Subject: [PATCH] savegame example: clarify that CBOR can be read MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The documentation talked about using CBOR to keep folk from reading, where (of course) it merely makes it more obscure (and compact). Make clear that this just makes it less easy and mention the tool that makes it easy again. Task-number: QTBUG-111228 Pick-to: 6.5 Change-Id: I472acda4b7533db41ab0e78b694e0256b34d2b40 Reviewed-by: Marc Mutz Reviewed-by: MÃ¥rten Nordheim --- .../serialization/savegame/doc/src/savegame.qdoc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/corelib/serialization/savegame/doc/src/savegame.qdoc b/examples/corelib/serialization/savegame/doc/src/savegame.qdoc index 51d2ab94b6..c8ca415936 100644 --- a/examples/corelib/serialization/savegame/doc/src/savegame.qdoc +++ b/examples/corelib/serialization/savegame/doc/src/savegame.qdoc @@ -11,11 +11,12 @@ Many games provide save functionality, so that the player's progress through the game can be saved and loaded at a later time. The process of saving a - game generally involves serializing each game object's member variables - to a file. Many formats can be used for this purpose, one of which is JSON. - With QJsonDocument, you also have the ability to serialize a document in a - \l {RFC 7049} {CBOR} format, which is great if you - don't want the save file to be readable, or if you need to keep the file size down. + game generally involves serializing each game object's member variables to a + file. Many formats can be used for this purpose, one of which is JSON. With + QJsonDocument, you also have the ability to serialize a document in a \l + {RFC 7049} {CBOR} format, which is great if you don't want the save file to + be easy to read (but see \l {Parsing and displaying CBOR data} for how it \e + can be read), or if you need to keep the file size down. In this example, we'll demonstrate how to save and load a simple game to and from JSON and binary formats.