Parse JSON file to dictionary

Actually, I already have a solution that works but each time I need a color I go to read the file.
And I think this method is very slow as the app has some lags.
So this is why I think that loading the json at first run to a dictionary stored in TinyDB should work better.

I have to reduce the read access, so I try to find a solution to read in memory (except for first get value from TinyDB)

AT FIRST RUN

  • read the json file and convert it to a dictionnary
  • save this dictionary to TinyDB

AT EACH RUN

  • set a global variable with the saved dictionary (thanks to the tinyDB get value)
  • read the value from the variable (with “get value for key” block)