# JsonDurableDictionaryCommandCodec&lt;TKey, TValue&gt;.WriteSnapshot(IReadOnlyCollection&lt;KeyValuePair&lt;TKey, TValue&gt;&gt;, JournalStreamWriter)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.json.jsondurabledictionarycommandcodec-2/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.json.jsondurabledictionarycommandcodec-2/methods/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable/Journaling/Formats/Json/JsonDurableDictionaryCommandCodec.cs#L60-L85)

```csharp
public void JsonDurableDictionaryCommandCodec<TKey, WriteSnapshot(IReadOnlyCollection<KeyValuePair<TKey, TValue>> items, JournalStreamWriter writer)
```

Writes a snapshot command, deriving the item count from `items`.

### Parameters

- `items` (`IReadOnlyCollection<KeyValuePair<TKey, TValue>>`)
- `writer` (`JournalStreamWriter`)
