Skip to content

Major refactor: Don't keep JSON around after loading, switch to RapidJSON#203

Draft
Epicpkmn11 wants to merge 16 commits into
masterfrom
refactor-json
Draft

Major refactor: Don't keep JSON around after loading, switch to RapidJSON#203
Epicpkmn11 wants to merge 16 commits into
masterfrom
refactor-json

Conversation

@Epicpkmn11

@Epicpkmn11 Epicpkmn11 commented Jul 6, 2026

Copy link
Copy Markdown
Member

This does two major things: A) changes nlohmann::json to RapidJSON and B) removes all random JSON runtime structures, everything is properly loaded to classes and structs now. These aren't technically related to each other, but I really didn't want to put in all the work of to do one of them without the other, only to immediately do more work. It also made it very easy to catch any mistakes, I'm quite confident on the no random JSONs cause I've deleted the old lib so there can't be any stragglers I didn't see.

TODO:

  • Finish removing nlohmann::json
  • Finish everything commented "TODO!!"
  • Make sure I didn't break anything
    • Test arg mode
  • Why doesn't the top screen of the download list show?

Prep for next commit
…JSON

This is WIP! I have only changed some of the JSON over to RapidJSON, there's still more work to do. The most notable improvements are on inital load and in the UniStore list.

I hope this is free of regressions, but its a huge commit, there might be some regressions -- be warned if using git builds. Please let me know anything that's broken.
So that's why it had a special case :sweat_smile
It now properly fades out
Yes, it is required unless you want to force the user to type capitals
Azahar has fixed the wifi check
This one looks big, but its not too too scary. Most of the changes are because I changed the global from "std::unique_ptr<Theme> UIThemes" to "Theme UITheme" because there's no compelling reason for it to be a pointer
The other reason its so big is that the Theme now represents one single theme where before it was both a single theme *and* all the themes
I accidentally wrote Config to Theme.json and found this :p
Big change on this one too, proper structured data at runtime instead of just JSON
@Epicpkmn11

Copy link
Copy Markdown
Member Author

Alrighty! This is (theoretically) done!

I need to do more regression testing as this is a big change (not as big as it looks, actually +2191 -2797 loc, ignoring the JSON libs, but still big)

its not just a JSON lib swap, I also refactored major parts of the codebase so that no JSON is being casually kept around in memory all the time anymore; now everything is properly structured data!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant