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