Affects Version/s: Master
Steps to reproduce:
- Go to master private.
- Enable Asset Auto Tagging in "System Settings --> Assets
- Enable the Google Cloud Vision Auto Tag Provider in "System Settings --> Documents And Media" with a valid API Key (https://cloud.google.com/docs/authentication/api-keys).
- Add an image to the document library.
Expected: The image is tagged by google cloud vision.
Actual: The image is not tagged and an error is displayed in the logs.
What is actually happening is that we are building a malformed JSON string:
This is what we should be sending:
But we are sending something like:
The problem is that the call we use to create an inline JSON array is passing the value as an Object instead of a JSONObject which ends up being serialized as a String.