Giter VIP home page Giter VIP logo

Comments (6)

paceholder avatar paceholder commented on May 30, 2024 1

Actually, the solution is simple: Qt's JSON code supports text-based and binary JSON files. You can check it out in the Qt example.

    QJsonDocument saveDoc(gameObject);
    saveFile.write(saveFormat == Json
        ? saveDoc.toJson()
        : saveDoc.toBinaryData());

I want to get rid of my hand-made binary serialization and go for JSON in whatever form the user wants.

from nodeeditor.

hardliner66 avatar hardliner66 commented on May 30, 2024

Best solution would be to support both and let the user decide.

from nodeeditor.

hardliner66 avatar hardliner66 commented on May 30, 2024

Maybe you could abstract the serialization away so that the user can specify a custom serialization, with QJson as default serializer. This way everybody could plugin the serialization format they want.

If you need any help with this, let me know.

from nodeeditor.

paceholder avatar paceholder commented on May 30, 2024

Writing the abstracted serialization code is way not trivial. The serialization itself is a complex problem, thus, it is hard to foresee what a client's serialization implementation could look like. For not just the Json serialization is implemented (in its simplest form, without versioning).

from nodeeditor.

russelltg avatar russelltg commented on May 30, 2024

Is this completed? It seems that is is...

from nodeeditor.

paceholder avatar paceholder commented on May 30, 2024

Well, I made some sort of serializaiton to JSON, there is a way to construct JSON on-the-fly from your data structure and pass to deserialization.

But this is not an "abstracted serialization" -- it would be complicated and I did not go this way

from nodeeditor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.