/*!
 * 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.
 */
export const jsonRoot = [() => jsonObject, () => jsonArray, ...jsonPrimitives];
{
}
/**
 */
export const jsonObject = builder.mapRecursive("object", TreeFieldSchema.createUnsafe(FieldKinds.optional, jsonRoot));
/**
 */
export const jsonArray = builder.fieldNodeRecursive("array", TreeFieldSchema.createUnsafe(FieldKinds.sequence, jsonRoot));
/**
 */
export const jsonSchema = builder.intoLibrary();
//# sourceMappingURL=jsonDomainSchema.js.map