ThirdwebStorage.downloadJSON() method
Downloads JSON data from any URL scheme. Resolves any URLs with schemes to retrievable gateway URLs.
Signature:
downloadJSON<TJSON = any>(url: string): Promise<TJSON>;
Parameters
Parameter | Type | Description |
---|---|---|
url | string | The URL of the JSON data to download |
Returns:
Promise<TJSON>
The JSON data fetched from the resolved URL
Example
const uri = "ipfs://example";
const json = await storage.downloadJSON(uri);