Skip to content

@toolcog/util/json

Toolcog utilities

Interfaces

FormatJsonOptions

Properties

indent?

optional indent: number

Defined in

format.ts:5


FunctionSchema

Properties

description?

readonly optional description: string

Defined in

schema.ts:113

name?

readonly optional name: string

Defined in

schema.ts:112

parameters?

readonly optional parameters: Schema

Defined in

schema.ts:114

returns?

readonly optional returns: Schema

Defined in

schema.ts:115


Schema

Properties

$comment?

readonly optional $comment: string

Defined in

schema.ts:36

$defs?

readonly optional $defs: object

Index Signature

[key: string]: SchemaDefinition

Defined in

schema.ts:39

$id?

readonly optional $id: string

Defined in

schema.ts:33

$ref?

readonly optional $ref: string

Defined in

schema.ts:34

$schema?

readonly optional $schema: MetaSchema

Defined in

schema.ts:35

additionalItems?

readonly optional additionalItems: SchemaDefinition

Defined in

schema.ts:60

additionalProperties?

readonly optional additionalProperties: SchemaDefinition

Defined in

schema.ts:76

allOf?

readonly optional allOf: SchemaDefinition[]

Defined in

schema.ts:83

anyOf?

readonly optional anyOf: SchemaDefinition[]

Defined in

schema.ts:84

const?

readonly optional const: SchemaType

Defined in

schema.ts:44

contains?

readonly optional contains: SchemaDefinition

Defined in

schema.ts:64

contentEncoding?

readonly optional contentEncoding: string

Defined in

schema.ts:98

contentMediaType?

readonly optional contentMediaType: string

Defined in

schema.ts:97

default?

readonly optional default: SchemaType

Defined in

schema.ts:103

dependencies?

readonly optional dependencies: object

Index Signature

[key: string]: SchemaDefinition | string[]

Defined in

schema.ts:77

description?

readonly optional description: string

Defined in

schema.ts:102

else?

readonly optional else: SchemaDefinition

Defined in

schema.ts:91

enum?

readonly optional enum: readonly SchemaType[]

Defined in

schema.ts:43

examples?

readonly optional examples: SchemaType

Defined in

schema.ts:106

exclusiveMaximum?

readonly optional exclusiveMaximum: number

Defined in

schema.ts:49

exclusiveMinimum?

readonly optional exclusiveMinimum: number

Defined in

schema.ts:51

format?

readonly optional format: string

Defined in

schema.ts:94

function?

optional function: FunctionSchema

Defined in

schema.ts:108

if?

readonly optional if: SchemaDefinition

Defined in

schema.ts:89

items?

readonly optional items: SchemaDefinition | readonly SchemaDefinition[]

Defined in

schema.ts:59

maximum?

readonly optional maximum: number

Defined in

schema.ts:48

maxItems?

readonly optional maxItems: number

Defined in

schema.ts:61

maxLength?

readonly optional maxLength: number

Defined in

schema.ts:54

maxProperties?

readonly optional maxProperties: number

Defined in

schema.ts:67

minimum?

readonly optional minimum: number

Defined in

schema.ts:50

minItems?

readonly optional minItems: number

Defined in

schema.ts:62

minLength?

readonly optional minLength: number

Defined in

schema.ts:55

minProperties?

readonly optional minProperties: number

Defined in

schema.ts:68

multipleOf?

readonly optional multipleOf: number

Defined in

schema.ts:47

not?

readonly optional not: SchemaDefinition

Defined in

schema.ts:86

oneOf?

readonly optional oneOf: SchemaDefinition[]

Defined in

schema.ts:85

pattern?

readonly optional pattern: string

Defined in

schema.ts:56

patternProperties?

readonly optional patternProperties: object

Index Signature

[key: string]: SchemaDefinition

Defined in

schema.ts:73

properties?

readonly optional properties: object

Index Signature

[key: string]: SchemaDefinition

Defined in

schema.ts:70

propertyNames?

readonly optional propertyNames: SchemaDefinition

Defined in

schema.ts:80

readOnly?

readonly optional readOnly: boolean

Defined in

schema.ts:104

required?

readonly optional required: string[]

Defined in

schema.ts:69

then?

readonly optional then: SchemaDefinition

Defined in

schema.ts:90

title?

readonly optional title: string

Defined in

schema.ts:101

type?

readonly optional type: SchemaTypeName | readonly SchemaTypeName[]

Defined in

schema.ts:42

uniqueItems?

readonly optional uniqueItems: boolean

Defined in

schema.ts:63

writeOnly?

readonly optional writeOnly: boolean

Defined in

schema.ts:105

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

schema.ts:23


SchemaDefinition

SchemaDefinition: Schema | boolean

Defined in

schema.ts:30


SchemaType

SchemaType: void | undefined | null | boolean | number | string | readonly SchemaType[] | object

Defined in

schema.ts:13


SchemaTypeName

SchemaTypeName: "void" | "undefined" | "null" | "boolean" | "integer" | "number" | "string" | "array" | "object" | "function"

Defined in

schema.ts:1

Functions

formatJson()

formatJson(value, schema?, options?): string

Parameters

value: unknown

schema?: SchemaDefinition

options?: FormatJsonOptions

Returns

string

Defined in

format.ts:8