Skip to content

Function: formatAsJSON()

ts
function formatAsJSON(schema, pretty?): string;

Defined in: schemaFormatters.ts:10

Formats the schema as JSON string

Parameters

ParameterTypeDefault valueDescription
schemaExportedSchemaundefinedThe schema to format
prettybooleantrueWhether to pretty print the JSON

Returns

string

The configuration schema as a JSON string