1

I have just started using clarifai for image analysis but I can't actually convert the output I am getting as a List into Json. The List is not the normal list, I have tried the normal Gson().toJson but not to any effect. My request code is :

 final PredictRequest<Concept> predictionResults = client.getDefaultModels().generalModel().predict().withInputs(ClarifaiInput.forImage("image url here"));

        List<ClarifaiOutput<Concept>> result = predictionResults.executeSync().get();
        result.get(0);

Can anyone suggest something....

applecrusher
  • 5,508
  • 5
  • 39
  • 89
Rakesh Vasal
  • 266
  • 5
  • 13

1 Answers1

2

Eddie from Clarifai here.

You can grab the raw JSON as a string using the response.rawBody() (source) but should be able to get everything you need from the objects in the list. Is there something else that should be supported?

eddiezane
  • 896
  • 7
  • 13