UXP Photoshop Plugin Development status fetch()

I’ve been using my own CEP plugin for sometime and it is need of an upgrade and my research has brought me here - Photoshop plugin developed in UXP. Very excited.
As I’m dipping my toes, I’m finding it hard to know what is supported in Photoshop UXP, what is XD specific, which manifest version etc. As a rookie programmer, I seem to be going around in circles somewhat.
The first most basic step I need is for the plugin to read a JSON object from a REST API endpoint via a URL.
Is this possible in UXP’s current state?
I keep getting a “Unexpected token > in JSON at position 0 Error” when I make fetch() request. Perhaps I’m just using wrong syntax.
It then appeared I need to open the domain via the “requiredPermission” key in the manifest.json, but it now seems that version 4 does not suppor this?
Am I on the right track? If so, can I please ask the correct way to make a simple fetch request?
Thanks in advance.

I didn’t have to deal with fetch() myself, but…

If you’re starting fresh, I’d suggest to use latest versions (meaning manifest v5). There are quite a bit of changes between v4 and v5, so you wouldn’t have to worry later about upgrading.

About JSON - error implies, your response contains > symbol at the beginning. Try logging the response content to see what it actually is. It sounds like your server isn’t returning a valid JSON

Certainly hope to use the latest version, but is V5 compatible with Photoshop? It is unclear? I copied an example V5 into my template plugin and it returned an error when I attempted to load it…

Yes, it’s compatible, but as I mentioned, it has some breaking changes since v4 and you will have to deal with them.