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

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

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.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`)
