/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { FieldKinds, SchemaBuilder } from "../../feature-libraries";
import * as leaf from "../leafDomain";
const builder = new SchemaBuilder("Json Domain", {}, leaf.library);
/**
 * @alpha
 * @deprecated Use leaf.number
 */
export const jsonNumber = leaf.number;
/**
 * @alpha
 * @deprecated Use leaf.string
 */
export const jsonString = leaf.string;
/**
 * @alpha
 */
export const jsonNull = builder.struct("Json.Null", {});
/**
 * @alpha
 * @deprecated Use leaf.boolean
 */
export const jsonBoolean = leaf.boolean;
const jsonPrimitives = [...leaf.primitives, jsonNull];
/**
 * Types allowed as roots of Json content.
 * @alpha
 */
export const jsonRoot = [() => jsonObject, () => jsonArray, ...jsonPrimitives];
{
}
/**
 * @alpha
 */
export const jsonObject = builder.mapRecursive("Json.Object", SchemaBuilder.fieldRecursive(FieldKinds.optional, ...jsonRoot));
/**
 * @alpha
 */
export const jsonArray = builder.fieldNodeRecursive("Json.Array", SchemaBuilder.fieldRecursive(FieldKinds.sequence, ...jsonRoot));
/**
 * @alpha
 */
export const jsonSchema = builder.intoLibrary();
//# sourceMappingURL=jsonDomainSchema.js.map