Json google vision

Hi team,

i’m trying to make a post call to google cloud vision, passing the image in base64

this is a part of the output, where inside the description field I have the output of the text obtained from the image via ocr.

How do I now get just that one field? I tried deserialize but I can’t, could there be an error in the request?

Thanks in advance

Hi @andreus91 ,

Could you Let us know what was the Error occurred and what was the method used, maybe using Screenshots ?

1 Like

Hi! I just need to bring the “description” field.

From this feedback would assume that deserialization is now working and you want to extract all descriptions.

If possible please share a sample JSON as text /text file with us and we work out a solution based on this. Thanks

1 Like

@andreus91 ,

We need to use a couple of deserialize JSON array and deserialize JSON to fetch a particular field. If you are able to share output it would be helpful.

This is the body param:

“{‘requests’ : [{‘image’ : {‘content’ : '”+base64ImageString+“'},‘features’ : [{‘model’ : ‘builtin/latest’,‘type’ : ‘DOCUMENT_TEXT_DETECTION’,‘maxResults’ : 50}]}]}”

I used the http request - post - body format: application/json

Subsequently, I inserted the output in a message box, like this:


This is the output of the message box:

Now, the result is in “description”: “rusebbia”

How can i extract this value?


Hi @andreus91 ,

What we require is the Output String that you receive after the HttpRequest call.

Since, we would need to parse the Json to get the required value.

You could provide us that either using the </> Preformatted text in the Editor or you could send us the data in a Text File.

This is the text file given by the output of the http request.

my string is after “description” or “text”

Thanks in advance

subBody.txt (11.0 KB)

Hi @andreus91 ,

Give a Try on the below Steps :

  1. Use Deserialize Json Activity with TypeArgument as JsonObject and input as the Output from the API, Let the output be jObj

  2. Next, we could get all the description field values from the textAnnotations JsonArray using the following Expression :

String.Join(",",jObj("responses")(0)("textAnnotations").cast(Of JObject).Select(Function(x)x("description").ToString))

This provide us all the description field values present in the textAnnotations JsonArray

Let us know if this method is not useful for your case.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.