Getting recognition results as JSON

Contents
[ ]

Aspose.OCR for Java can return recognition results in JSON format - de facto data exchange standard for websites and REST APIs. To get the results as JSON, use GetJson method of RecognitionResult object.

AsposeOCR api = new AsposeOCR();
// Customize recognition
RecognitionSettings recognitionSettings = new RecognitionSettings();
recognitionSettings.setLanguage(Language.Ukr);
// Extract text from image
RecognitionResult result = api.RecognizePage("source.png", recognitionSettings);
// Get recognition results as JSON
String resultJSON = result.GetJson();