# ~~Variable: profileToWell~~

> Serializes a Well object into a versioned JSON string suitable for storage or transmission.

> `const` **profileToWell**: (`well`) => `string` = `serializeWell`

Serializes a [Well](/core/api/type-aliases/Well) object into a versioned JSON string suitable for
storage or transmission.

Root members the spec does not define (`x-` fields and blocks, foreign
members) are written after the spec blocks, unchanged. Nested unknown
members travel inside their objects. Legacy v1 keys (`lat`, `lng`,
`elevation`, …) are never written.

## Parameters

### well

[`Well`](/core/api/type-aliases/Well)

The well profile to serialize.

## Returns

`string`

A JSON string containing the versioned well payload.

## Deprecated

Use [serializeWell](/core/api/functions/serializeWell)
