iTunes Lookup API Returning Incorrect Version and JSON Serialization Error

I am encountering issues when retrieving the App Store version of my app using the iTunes Lookup API in Swift 5 on iOS. The API sometimes returns the incorrect version, and occasionally, it produces the following error message:JSON could not be serialised because of error: The data couldn't be read because it isn't in the correct format.

(https://itunes.apple.com/lookup)

I would appreciate any guidance on resolving these issues. Thank you for your assistance.

iTunes Lookup API Returning Incorrect Version and JSON Serialization Error
 
 
Q