@AtlantisPleb I've done some changes to the code :
JSON Response Handling:
  • The JSON response from the API is decoded to extract the "image" URL field.
Error Handling:
  • Added error handling to manage JSON decoding errors and invalid/missing "image" field in the response.
JSON Encoding:
  • The extracted "image" URL is re-encoded into a JSON object to ensure it can be handled efficiently.
Memory Allocation and Offset Management:
  • The JSON-encoded image URL is allocated in memory.
  • The memory offset where the URL is stored is then passed back as the output.
With these changes, the functionality now correctly fetches only the image URL from the API response, handles errors, and manages memory allocation to ensure seamless processing and output.
this territory is moderated
Awesome! Thank you!
reply