I’m in the process of updating my porfolio site and was thinking “how good would it be if i could just update a JSON file when i need to change it instead of going into the code itself”. So naturally, i looked into JSON decoding and accessing JSON files and settled on a basic HTTP request to fetch a public JSON file and decode that on runtime, populating the site with the decoded info. Awesome, thats done!
But, thats not really what i wanted for originally, so i kept looking for anything relating to decoding JSON at compile time and i couldnt find anything! Everyone seems to only want to use JSON from HTTP requests and not as config / site copy files.
So i was wondering if i’ve missed something, or if anyone knows the best way i can take a JSON file and decode it at compile time, avoiding the use of any HTTP requests! I’m open to anything ![]()