/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { FieldKinds, FlexFieldSchema, SchemaBuilderInternal, } from "../../feature-libraries/index.js";
import { leaf } from "../leafDomain.js";
const builder = new SchemaBuilderInternal({
    scope: "com.fluidframework.json",
    libraries: [leaf.library],
});
const jsonPrimitives = [...leaf.primitives, leaf.null];
/**
 * Types allowed as roots of Json content.
 */
export const jsonRoot = [() => jsonObject, () => jsonArray, ...jsonPrimitives];
{
}
export const jsonObject = builder.mapRecursive("object", FlexFieldSchema.createUnsafe(FieldKinds.optional, jsonRoot));
export const jsonArray = builder.fieldNodeRecursive("array", FlexFieldSchema.createUnsafe(FieldKinds.sequence, jsonRoot));
export const jsonSchema = builder.intoLibrary();
//# sourceMappingURL=jsonDomainSchema.js.map