Getting recognition results as JSON
Contents
[
Hide
]
Aspose.OCR for C++ can return recognition results in JSON format - de facto data exchange standard for websites and REST APIs. To get the results as JSON, set format
property of recognition settings to export_format::json
and call any recognition method.
std::string image_path = "source.png";
const size_t len = 4096;
wchar_t buffer[len] = { 0 };
RecognitionSettings settings;
settings.format = export_format::json;
size_t res_len = aspose::ocr::page_settings(image_path.c_str(), buffer, len, settings);
std::wcout << buffer;