@toolcog/util/json
Toolcog utilities
Interfaces
FormatJsonOptions
Properties
indent?
optional
indent:number
Defined in
FunctionSchema
Properties
description?
readonly
optional
description:string
Defined in
name?
readonly
optional
name:string
Defined in
parameters?
readonly
optional
parameters:Schema
Defined in
returns?
readonly
optional
returns:Schema
Defined in
Schema
Properties
$comment?
readonly
optional
$comment:string
Defined in
$defs?
readonly
optional
$defs:object
Index Signature
[key
: string
]: SchemaDefinition
Defined in
$id?
readonly
optional
$id:string
Defined in
$ref?
readonly
optional
$ref:string
Defined in
$schema?
readonly
optional
$schema:MetaSchema
Defined in
additionalItems?
readonly
optional
additionalItems:SchemaDefinition
Defined in
additionalProperties?
readonly
optional
additionalProperties:SchemaDefinition
Defined in
allOf?
readonly
optional
allOf:SchemaDefinition
[]
Defined in
anyOf?
readonly
optional
anyOf:SchemaDefinition
[]
Defined in
const?
readonly
optional
const:SchemaType
Defined in
contains?
readonly
optional
contains:SchemaDefinition
Defined in
contentEncoding?
readonly
optional
contentEncoding:string
Defined in
contentMediaType?
readonly
optional
contentMediaType:string
Defined in
default?
readonly
optional
default:SchemaType
Defined in
dependencies?
readonly
optional
dependencies:object
Index Signature
[key
: string
]: SchemaDefinition
| string
[]
Defined in
description?
readonly
optional
description:string
Defined in
else?
readonly
optional
else:SchemaDefinition
Defined in
enum?
readonly
optional
enum: readonlySchemaType
[]
Defined in
examples?
readonly
optional
examples:SchemaType
Defined in
exclusiveMaximum?
readonly
optional
exclusiveMaximum:number
Defined in
exclusiveMinimum?
readonly
optional
exclusiveMinimum:number
Defined in
format?
readonly
optional
format:string
Defined in
function?
optional
function:FunctionSchema
Defined in
if?
readonly
optional
if:SchemaDefinition
Defined in
items?
readonly
optional
items:SchemaDefinition
| readonlySchemaDefinition
[]
Defined in
maximum?
readonly
optional
maximum:number
Defined in
maxItems?
readonly
optional
maxItems:number
Defined in
maxLength?
readonly
optional
maxLength:number
Defined in
maxProperties?
readonly
optional
maxProperties:number
Defined in
minimum?
readonly
optional
minimum:number
Defined in
minItems?
readonly
optional
minItems:number
Defined in
minLength?
readonly
optional
minLength:number
Defined in
minProperties?
readonly
optional
minProperties:number
Defined in
multipleOf?
readonly
optional
multipleOf:number
Defined in
not?
readonly
optional
not:SchemaDefinition
Defined in
oneOf?
readonly
optional
oneOf:SchemaDefinition
[]
Defined in
pattern?
readonly
optional
pattern:string
Defined in
patternProperties?
readonly
optional
patternProperties:object
Index Signature
[key
: string
]: SchemaDefinition
Defined in
properties?
readonly
optional
properties:object
Index Signature
[key
: string
]: SchemaDefinition
Defined in
propertyNames?
readonly
optional
propertyNames:SchemaDefinition
Defined in
readOnly?
readonly
optional
readOnly:boolean
Defined in
required?
readonly
optional
required:string
[]
Defined in
then?
readonly
optional
then:SchemaDefinition
Defined in
title?
readonly
optional
title:string
Defined in
type?
readonly
optional
type:SchemaTypeName
| readonlySchemaTypeName
[]
Defined in
uniqueItems?
readonly
optional
uniqueItems:boolean
Defined in
writeOnly?
readonly
optional
writeOnly:boolean
Defined in
Type Aliases
MetaSchema
MetaSchema:
"http://json-schema.org/schema#"
|"http://json-schema.org/hyper-schema#"
|"http://json-schema.org/draft-07/schema#"
|"http://json-schema.org/draft-07/hyper-schema#"
|string
&object
Defined in
SchemaDefinition
SchemaDefinition:
Schema
|boolean
Defined in
SchemaType
SchemaType:
void
|undefined
|null
|boolean
|number
|string
| readonlySchemaType
[] |object
Defined in
SchemaTypeName
SchemaTypeName:
"void"
|"undefined"
|"null"
|"boolean"
|"integer"
|"number"
|"string"
|"array"
|"object"
|"function"
Defined in
Functions
formatJson()
formatJson(
value
,schema
?,options
?):string
Parameters
• value: unknown
• schema?: SchemaDefinition
• options?: FormatJsonOptions
Returns
string