ToJSON
function ToJSON(bWriteNumberings: boolean = null, bWriteStyles: boolean = null): JSON
Description
Converts the ApiParagraph object into the JSON object.
Parameters
- bWriteNumberings
boolean
null Specifies if the used numberings will be written to the JSON object or not.
- bWriteStyles
boolean
null Specifies if the used styles will be written to the JSON object or not.
Returns
JSON
Overloads
- ToJSON
(bWriteStyles)
Converts the ApiParaPr object into the JSON object.
Try It
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);