ToJSON
function ToJSON(bWriteNumberings: boolean = null): JSON
Description
Converts the ApiStyle object into the JSON object.
Parameters
- bWriteNumberings
boolean
null Specifies if the used numberings will be written to the JSON object or not.
Returns
JSON
Try It
var oDocument = Api.GetDocument();
var oTableStyle = oDocument.GetStyle("Bordered");
var json = oTableStyle.ToJSON(false);
var oStyleFromJSON = Api.FromJSON(json);
oStyleFromJSON.SetName("My Custom Style");
var oTable = Api.CreateTable(2, 2);
oTable.SetWidth("percent", 100);
oTable.SetStyle(oStyleFromJSON);
oDocument.Push(oTable);