---
title: "Class ProductJsonConverter | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Serialization/ProductJsonConverter/"
---

# Class ProductJsonConverter

> **Inheritance:** `System.Object` -> ProductJsonConverter

###### **Namespace**: [Aurigma.DesignAtoms.Serialization](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Serialization.md)

###### **Assembly**: Aurigma.DesignAtoms.dll

```csharp title="Syntax"
public class ProductJsonConverter : JsonConverter
```

## Constructors

### ProductJsonConverter

```csharp
public ProductJsonConverter(IConfiguration configuration, IFontService fontService, IStateResourcesRepository stateResourcesRepository, IRepositoryFileProtectorFactory repositoryFileProtectorFactory, IImageLoader imageLoader, IColorManagement colorManagement, ILifetimeScope scope, ISvgReaderFactory svgReaderFactory, ISerializableStorage serializationStorage = null, IStateResourcesRepository runTimeStorage = null, bool convertUrlSourcesToStorage = false, JsonSerializerSettings jsonSerializerSettings = null)
```

## Properties

### ColorConverter

```csharp
protected virtual JsonConverter ColorConverter { get; }
```

### DeserializationContext

```csharp
public DeserializationContext DeserializationContext { get; }
```

## Methods

### GetConverters

```csharp
protected virtual IEnumerable<JsonConverter> GetConverters(IConfiguration configuration, IStateResourcesRepository stateResourcesRepository, ISerializableStorage serializationStorage, IStateResourcesRepository runTimeStorage, IImageLoader imageLoader, IColorManagement colorManagement, IFontService fontService, ILifetimeScope scope, IRepositoryFileProtector repositoryFileProtector, ISvgReaderFactory svgReaderFactory, bool convertUrlSourcesToStorage)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| [Aurigma.DesignAtoms.Configuration.IConfiguration](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Configuration/IConfiguration.md) | *configuration* |  |
| [Aurigma.DesignAtoms.Storage.Repositories.Interfaces.IStateResourcesRepository](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Storage.Repositories.Interfaces/IStateResourcesRepository.md) | *stateResourcesRepository* |  |
| `Aurigma.DesignAtoms.Cache.Abstractions.Interfaces.ISerializableStorage` | *serializationStorage* |  |
| [Aurigma.DesignAtoms.Storage.Repositories.Interfaces.IStateResourcesRepository](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Storage.Repositories.Interfaces/IStateResourcesRepository.md) | *runTimeStorage* |  |
| [Aurigma.DesignAtoms.Canvas.IImageLoader](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Canvas/IImageLoader.md) | *imageLoader* |  |
| [Aurigma.DesignAtoms.ColorManagement.IColorManagement](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.ColorManagement/IColorManagement.md) | *colorManagement* |  |
| [Aurigma.DesignAtoms.Services.IFontService](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Services/IFontService.md) | *fontService* |  |
| `Autofac.ILifetimeScope` | *scope* |  |
| [Aurigma.DesignAtoms.Storage.Repositories.Interfaces.Protectors.IRepositoryFileProtector](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Storage.Repositories.Interfaces.Protectors/IRepositoryFileProtector.md) | *repositoryFileProtector* |  |
| [Aurigma.DesignAtoms.Common.Interfaces.ISvgReaderFactory](https://customerscanvas.com/docs/on-premises/design-atoms-cs/reference/api/Aurigma.DesignAtoms.Common.Interfaces/ISvgReaderFactory.md) | *svgReaderFactory* |  |
| `System.Boolean` | *convertUrlSourcesToStorage* |  |

##### Returns

`System.Collections.Generic.IEnumerable<Newtonsoft.Json.JsonConverter>`

### GetInternalConverters

```csharp
public IEnumerable<JsonConverter> GetInternalConverters()
```

##### Returns

`System.Collections.Generic.IEnumerable<Newtonsoft.Json.JsonConverter>`

### WriteJson

```csharp
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `Newtonsoft.Json.JsonWriter` | *writer* |  |
| `System.Object` | *value* |  |
| `Newtonsoft.Json.JsonSerializer` | *serializer* |  |

### ReadJson

```csharp
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer topSerializer)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `Newtonsoft.Json.JsonReader` | *reader* |  |
| `System.Type` | *objectType* |  |
| `System.Object` | *existingValue* |  |
| `Newtonsoft.Json.JsonSerializer` | *topSerializer* |  |

##### Returns

`System.Object`

### CanConvert

```csharp
public override bool CanConvert(Type objectType)
```

##### Parameters

| Type | Name | Description |
|:---|:---|:---|
| `System.Type` | *objectType* |  |

##### Returns

`System.Boolean`

## Fields

### _serializationStorage

```csharp
protected readonly ISerializableStorage _serializationStorage
```

### _runTimeStorage

```csharp
protected readonly IStateResourcesRepository _runTimeStorage
```

### _stateResourcesRepository

```csharp
protected readonly IStateResourcesRepository _stateResourcesRepository
```

### _configuration

```csharp
protected readonly IConfiguration _configuration
```

### _jsonSerializerSettings

```csharp
protected readonly JsonSerializerSettings _jsonSerializerSettings
```

### _fontService

```csharp
protected readonly IFontService _fontService
```

### _imageLoader

```csharp
protected readonly IImageLoader _imageLoader
```

### _colorManagement

```csharp
protected readonly IColorManagement _colorManagement
```

### _scope

```csharp
protected readonly ILifetimeScope _scope
```

### _svgReaderFactory

```csharp
protected readonly ISvgReaderFactory _svgReaderFactory
```

### _repositoryFileProtectorFactory

```csharp
protected readonly IRepositoryFileProtectorFactory _repositoryFileProtectorFactory
```
