---
lang: en
title: 'API docs: openapi-v3.jsontoschemaobject'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/openapi-v3
permalink: /doc/en/lb4/apidocs.openapi-v3.jsontoschemaobject.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/openapi-v3](./openapi-v3.md) &gt; [jsonToSchemaObject](./openapi-v3.jsontoschemaobject.md)

## jsonToSchemaObject() function

Converts JSON Schemas into a SchemaObject

**Signature:**

```typescript
export declare function jsonToSchemaObject(json: JsonSchema, visited?: Map<JsonSchema, SchemaObject | SchemaRef>): SchemaObject | SchemaRef;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

json


</td><td>

JsonSchema


</td><td>

JSON Schema to convert from


</td></tr>
<tr><td>

visited


</td><td>

Map&lt;JsonSchema, SchemaObject \| [SchemaRef](./openapi-v3.schemaref.md)<!-- -->&gt;


</td><td>

_(Optional)_ A map to keep track of mapped json schemas to handle circular references


</td></tr>
</tbody></table>

**Returns:**

SchemaObject \| [SchemaRef](./openapi-v3.schemaref.md)


