sfcode
An Online Competing and Development Environment
|
ModificationOptions.isArrayInsertion
: If JSONPath
refers to an index of an array and isArrayInsertion
is true
, then modify
will insert a new item at that location instead of overwriting its contents.ModificationOptions.formattingOptions
is now optional. If not set, newly inserted content will be not be formatted.ParseOptions.allowEmptyContent
. Default is false
.getNodeType
: Returns the type of a value returned by parse.parse
: Fix issue with empty property nameJSONScanner
and JSONVisitor
return lineNumber / character.Node.columnOffset
to Node.colonOffset
getNodePath
: Gets the JSON path of the given JSON DOM nodefindNodeAtOffset
: Finds the most inner node at the given offset. If includeRightBound
is set, also finds nodes that end at the given offset.visit.onComment
API, reported when comments are allowed.ParseErrorCode.InvalidCommentToken
enum value, reported when comments are disallowed.format
API: computes edits to format a JSON document.modify
API: computes edits to insert, remove or replace a property or value in a JSON document.allyEdits
API: applies edits to a documentgetParseErrorMessage
)ParseError.offset
& ParseError.length
ParseOptions.allowTrailingComma
getLocation
. Now getLocation
inside an object will always return a property from inside that property. Can be empty string if the object has no properties or if the offset is before a actual property ‘{ "a": { | }} will return location ['a’, ' ']`