---
url: /reference/@cssdoc/json/interfaces/WriteJsonOptions.md
---
# Interface: WriteJsonOptions

Defined in: [emitters/json/src/index.ts:54](https://github.com/thedannywahl/cssdoc/blob/main/emitters/json/src/index.ts#L54)

Options for [writeJson](../functions/writeJson.md).

## Extends

* [`ModelInput`](ModelInput.md)

## Properties

### configuration?

```ts
optional configuration?: CssDocConfiguration;
```

Defined in: [emitters/json/src/index.ts:24](https://github.com/thedannywahl/cssdoc/blob/main/emitters/json/src/index.ts#L24)

The tag configuration to parse `css` with.

#### Inherited from

[`ModelInput`](ModelInput.md).[`configuration`](ModelInput.md#configuration)

***

### css?

```ts
optional css?: string | string[];
```

Defined in: [emitters/json/src/index.ts:20](https://github.com/thedannywahl/cssdoc/blob/main/emitters/json/src/index.ts#L20)

CSS source (one string or several concatenated) to parse.

#### Inherited from

[`ModelInput`](ModelInput.md).[`css`](ModelInput.md#css)

***

### dialect?

```ts
optional dialect?: CssDialect;
```

Defined in: [emitters/json/src/index.ts:28](https://github.com/thedannywahl/cssdoc/blob/main/emitters/json/src/index.ts#L28)

The stylesheet dialect of `css` (`scss`/`less` pick a dialect parser). Default `css`.

#### Inherited from

[`ModelInput`](ModelInput.md).[`dialect`](ModelInput.md#dialect)

***

### entries?

```ts
optional entries?: CssDocEntry[];
```

Defined in: [emitters/json/src/index.ts:22](https://github.com/thedannywahl/cssdoc/blob/main/emitters/json/src/index.ts#L22)

An already-parsed model (takes precedence over `css`).

#### Inherited from

[`ModelInput`](ModelInput.md).[`entries`](ModelInput.md#entries)

***

### lang?

```ts
optional lang?: "css" | "html" | "js" | "markdown";
```

Defined in: [emitters/json/src/index.ts:26](https://github.com/thedannywahl/cssdoc/blob/main/emitters/json/src/index.ts#L26)

The host language `css` is written in. Non-`css` values extract embedded CSS first. Default `css`.

#### Inherited from

[`ModelInput`](ModelInput.md).[`lang`](ModelInput.md#lang)

***

### outDir

```ts
outDir: string;
```

Defined in: [emitters/json/src/index.ts:56](https://github.com/thedannywahl/cssdoc/blob/main/emitters/json/src/index.ts#L56)

The output directory (created if missing).

***

### perRecord?

```ts
optional perRecord?: boolean;
```

Defined in: [emitters/json/src/index.ts:58](https://github.com/thedannywahl/cssdoc/blob/main/emitters/json/src/index.ts#L58)

Also write one file per record under `records/`, plus an `index.json` (default `false`).

***

### schema?

```ts
optional schema?: boolean;
```

Defined in: [emitters/json/src/index.ts:60](https://github.com/thedannywahl/cssdoc/blob/main/emitters/json/src/index.ts#L60)

Also write the model JSON Schema as `model.schema.json` (default `false`).
