Table of Contents

Method ToJson

Namespace
LMKit.Extraction.Ocr
Assembly
LM-Kit.NET.dll

ToJson()

Serializes this OcrResult instance to a JSON-formatted string.

public string ToJson()

Returns

string

A pretty-printed JSON string representing this OcrResult, including all its text elements and page layout properties.

Examples

// Cache OCR results to disk for later reuse
string json = ocrResult.ToJson();
File.WriteAllText("ocr_cache/page1.json", json);
Share