Function format
- format(documentText, range, options): EditResult
Parameters
- documentText: string
The input text
- range: Range
The range to format or
undefined
to format the full content - options: FormattingOptions
The formatting options
Returns EditResult
The edit operations describing the formatting changes to the original document following the format described in
EditResult
. To apply the edit operations to the input, useapplyEdits
.- documentText: string
Computes the edit operations needed to format a JSON document.