Service for hosting JSON files
There is an easy an simple way to store JSON data without needing a full backend or server. Several times past weeks, I wanted this as I was building small tools and PoCs and today, I want to share what I found.
My Googling came up short and I even started thinking that perhaps writing a service myself would be a good idea. After digging for competition however, I finally found what I was looking for. Turns out there is a service already and it is called JSONBin!
* I’m in no way affiliated with JSONBin, just a fan.
JSONBIN allows free and simple JSON storage over REST
Why did I want to store JSON anyway?
Most of the time I find hard coding a bit of configuration or data in the application is most cost efficient. If I really need to update the data without re-deploying, I usually upload a file to ftp or GCP Cloud Storage.
But, sometimes, I want to allow someone else to update data.
An example: A tool for your marketing team to generate campaign URLs (like with the campaign builder). However, you want to limit some of the options to predefined parameters.
You could easily code these parameters but every week or so, the marketing team wants a new campaign they want to use. If you could give them access to the list and they could add this themselves that would save a lot of time. This is where saving JSON makes sense.
When you need to store a small set of data with a minimum amount of overhead and complexity.
Options for storing data
I use Firebase as a backend for many of my projects.
Firebase has a great free tier with lots of options but, it requires quite a lot of setup to do something simple like saving an object in Firestore or a file. If you’ve tried using the Google Cloud Storage API you know what I mean.
Yet, when I googled for simpler solutions, AWS S3 was the winner amongst the proposed alternatives.
It’s true that uploading a file, especially if it is updated rarely, S3 or GCP buckets can be a very good solution. If you don’t need to secure the data either, it’s definitely a lower overhead and cost efficient solution.
There are also services like Airtable which I have used recently for accepting task submissions. It is great for automation but when it comes to reading and saving some object data the APIs have rate limits and come with more complexity than needed.
JSONBin does one thing really well
So this is where JSONBin shines. It saves and retrieves JSON data, that’s it. Nothing more nothing less.
The free plan will likely carry you for a long time (10,000 requests). If you need more, you pay for credits not for a running subscription. Great for hobby projects.
Give it a go for your next SPA app, I’m sure it’ll save you some time and once you know what you really need, then you can graduate to a more high level backend!
Happy coding 👍
It seems like there are more like me thinking that this is something that would be beneficial. Just today I came across https://myjson.online/ which is another app providing a similar service.