@loopback/docs
Version:
Documentation for LoopBack 4
35 lines (22 loc) • 839 B
Markdown
lang: en
title: 'API docs: repository.type.serialize'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.repository.type.serialize.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/repository](./repository.md) > [Type](./repository.type.md) > [serialize](./repository.type.serialize.md)
## Type.serialize() method
Serialize a value into json
<b>Signature:</b>
```typescript
serialize(value: T | null | undefined, options?: Options): any;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| value | <code>T | null | undefined</code> | The value of this type |
| options | <code>Options</code> | Options for serialization |
<b>Returns:</b>
`any`