ToJSON
function ToJSON(bWriteNumberings: boolean = null, bWriteStyles: boolean = null): JSON
Description
Converts the ApiBlockLvlSdt 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
Try It
var oDocument = Api.GetDocument();
var oBlockLvlSdt = Api.CreateBlockLvlSdt();
oBlockLvlSdt.SetAlias("№1");
var json = oBlockLvlSdt.ToJSON(false, true);
var oBlockLvlSdtFromJSON = Api.FromJSON(json);
oBlockLvlSdtFromJSON.GetContent().GetElement(0).AddText("This is a block text content control.");
oDocument.AddElement(0, oBlockLvlSdtFromJSON);