uni-ticket-system/node_modules/@dcloudio/uni-cli-shared/dist/json/json.js

10 lines
378 B
JavaScript
Raw Normal View History

2023-12-05 02:11:10 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseJson = void 0;
const jsonc_parser_1 = require("jsonc-parser");
const preprocess_1 = require("../preprocess");
function parseJson(jsonStr, shouldPre = false) {
return (0, jsonc_parser_1.parse)(shouldPre ? (0, preprocess_1.preJson)(jsonStr) : jsonStr);
}
exports.parseJson = parseJson;