# Sandbox.Json.ToNode

## Overload 1

```csharp
static System.Text.Json.Nodes.JsonNode ToNode(object obj)
```

Serialize a single object to a JsonNode

### Parameters

- `obj` (`object`)

### Returns

`System.Text.Json.Nodes.JsonNode`

## Overload 2

```csharp
static System.Text.Json.Nodes.JsonNode ToNode(object obj, System.Type type)
```

Serialize a single object to a JsonNode with the given expected type

### Parameters

- `obj` (`object`)
- `type` (`System.Type`)

### Returns

`System.Text.Json.Nodes.JsonNode`

Declared in [Sandbox.Json](/api/Sandbox.Json).
Assembly: `Sandbox.Engine`.
