@loopback/docs
Version:
Documentation for LoopBack 4
36 lines (23 loc) • 1.01 kB
Markdown
lang: en
title: 'API docs: testlab.testsandbox.writejsonfile'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/testlab
permalink: /doc/en/lb4/apidocs.testlab.testsandbox.writejsonfile.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/testlab](./testlab.md) > [TestSandbox](./testlab.testsandbox.md) > [writeJsonFile](./testlab.testsandbox.writejsonfile.md)
## TestSandbox.writeJsonFile() method
Creates a new file and writes the given data serialized as JSON.
<b>Signature:</b>
```typescript
writeJsonFile(dest: string, data: unknown): Promise<void>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| dest | <code>string</code> | Destination filename, optionally including a relative path. |
| data | <code>unknown</code> | The data to write. |
<b>Returns:</b>
`Promise<void>`