Table of Contents

Method ToJson

Namespace
LMKit.Document.Parsing
Assembly
LM-Kit.NET.dll

ToJson()

Serializes the document as JSON, losslessly: every page with its size and unit, every element with its category, bounds (bbox and polygon), reading index, confidence and typed content, the layout blocks and the figure texts.

public string ToJson()

Returns

string

The document as indented JSON.

Remarks

The JSON follows the versioned parsed-document schema named by its $schema member (https://docs.lm-kit.com/lm-kit-net/schemas/parsed-document/v1.json), with snake_case names. Positions are in the page's Unit, top-left origin. A table's text is its HTML with the header rows resolved as every rendering prints them.

FromJson(string) reads it back, so a parse can be stored once and rendered or exported again later without parsing the source again.

Share