Converts the specified JSON object into the Document Builder object of the corresponding type.
Name | Type | Description |
sMessage | JSON | The JSON object to convert. |
builder.CreateFile("docx"); var oDocument = Api.GetDocument(); var oParagraph = Api.CreateParagraph(); oParagraph.AddText("This is a new paragraph"); var json = oParagraph.ToJSON(false, true); var oParagraphFromJSON = Api.FromJSON(json); oParagraphFromJSON.SetBold(true); oDocument.AddElement(0, oParagraphFromJSON); builder.SaveFile("docx", "FromJSON.docx"); builder.CloseFile();