0

I am trying to figure out how to parse the data returned during a response from the Visual Recognition service

  [07/05/2018 20:39:40][ExampleVisualRecognition.OnClassifyPost()][DEBUG] 
  {"images":[{"classifiers": 
  [{"classifier_id":"Shapes_925471689","name":"Shapes","classes": 
  [{"class":"Square","score":0.787}]},

I know that customData["json"].ToString()) prints this output, and it a dictionary object but how would I extract specific data from the dictionary/Json such as "class" value "Square" ?

taj
  • 1,128
  • 1
  • 9
  • 23

1 Answers1

0

You should be able to use the ClassifiedImages object to get those values.

private void OnClassify(ClassifiedImages classify, Dictionary<string, object> customData)
{
    Log.Debug("Classification result", "class: {0}", classify.classifiers[0] );
}
taj
  • 1,128
  • 1
  • 9
  • 23