"use strict";
/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.Format = void 0;
const typebox_1 = require("@sinclair/typebox");
const index_js_1 = require("../../core/index.js");
const noAdditionalProps = { additionalProperties: false };
/**
 * Format for encoding as json.
 *
 * For consistency all lists are sorted and undefined values are omitted.
 *
 * This chooses to use lists of named objects instead of maps:
 * this choice is somewhat arbitrary, but avoids user data being used as object keys,
 * which can sometimes be an issue (for example handling that for "__proto__" can require care).
 * It also makes it simpler to deterministically sort by keys.
 */
exports.Format = typebox_1.Type.Object({
    version: typebox_1.Type.Literal(index_js_1.SchemaFormatVersion.v2),
    nodes: typebox_1.Type.Record(typebox_1.Type.String(), index_js_1.schemaFormatV2.TreeNodeSchemaDataFormat),
    root: index_js_1.schemaFormatV2.FieldSchemaFormat,
}, noAdditionalProps);
//# sourceMappingURL=formatV2.js.map