Skip to content

createJsoncEdits

createJsoncEdits(source, path, value, formattingOptions?): TextEdit[]

Defined in: packages/format-jsonc/src/edit.ts:10

Returns the minimal TextEdits needed to set value at path.

High-fidelity: uses jsonc-parser.modify() — the returned edits are minimal AST patches, so comments on untouched keys are preserved verbatim.

string

PropertyPath

unknown

FormattingOptions

TextEdit[]