fracturedjsonjs
Version:
JSON formatter that produces highly readable but fairly compact output
24 lines (23 loc) • 952 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.CommentPolicy = void 0;
/**
* Instructions on what to do about comments found in the input text. According to the JSON standard, comments
* aren't allowed. But "JSON with comments" is pretty wide-spread these days, thanks largely to Microsoft,
* so it's nice to have options.
*/
var CommentPolicy;
(function (CommentPolicy) {
/**
* An exception will be thrown if comments are found in the input.
*/
CommentPolicy[CommentPolicy["TreatAsError"] = 0] = "TreatAsError";
/**
* Comments are allowed in the input, but won't be included in the output.
*/
CommentPolicy[CommentPolicy["Remove"] = 1] = "Remove";
/**
* Comments found in the input should be included in the output.
*/
CommentPolicy[CommentPolicy["Preserve"] = 2] = "Preserve";
})(CommentPolicy = exports.CommentPolicy || (exports.CommentPolicy = {}));
;