When to use getJSON and when to use fetch?

The new or at least just by me discovered getJSON works like a charm and is so super easy to use. But I just want to know from someone at Wix Code Team when is it recommended to use getJSON and when to use fetch.

Is getJSON a pre made smaller set of wix-fetch maybe or is it the equivalent of jQuery?

#getJSON #wixfetch

Hi Andreas,

getJSON simplifies get requests where the response is a JSON - which is a popular usage of fetch.
It performs essentially the same action as a fetch request that is set to accept json as a response and allows you to write cleaner code.

Thanks a lot and also thanks a lot for bringing that method on the platform. It is super easy to use.