# JsonDurableDictionaryCommandCodec&lt;TKey, TValue&gt;

Package: [Microsoft.Orleans.Journaling](/orleans/docs/api/csharp/microsoft.orleans.journaling/) 10.0.0-alpha.1

[NuGet package](https://www.nuget.org/packages/Microsoft.Orleans.Journaling) | [Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Journaling/Formats/Json/JsonDurableDictionaryCommandCodec.cs#L15)

```csharp
public sealed class JsonDurableDictionaryCommandCodec<TKey, TValue> : IDurableDictionaryCommandCodec<TKey, TValue>
    where TKey : notnull
```

JSON codec for durable dictionary journal entries.

## Examples

```csharp
["set","alice",42]
            ["snapshot",[["alice",42]]]
```

## Constructors

- [JsonDurableDictionaryCommandCodec&lt;TKey, TValue&gt;(JsonSerializerOptions?)](/orleans/docs/api/csharp/microsoft.orleans.journaling/orleans.journaling.json.jsondurabledictionarycommandcodec-2/constructors/constructor-system-text-json-jsonserializeroptions-nullable-f3de7776/)

## Methods

- [Apply(JournalBufferReader, IDurableDictionaryCommandHandler&lt;TKey, TValue&gt;)](/orleans/docs/api/csharp/microsoft.orleans.journaling/orleans.journaling.json.jsondurabledictionarycommandcodec-2/methods/apply-orleans-journaling-journalbufferreader-orleans-journaling-idurabledictiona-1afa42ec/)
- [WriteClear(JournalStreamWriter)](/orleans/docs/api/csharp/microsoft.orleans.journaling/orleans.journaling.json.jsondurabledictionarycommandcodec-2/methods/writeclear-orleans-journaling-journalstreamwriter-50010eca/)
- [WriteRemove(TKey, JournalStreamWriter)](/orleans/docs/api/csharp/microsoft.orleans.journaling/orleans.journaling.json.jsondurabledictionarycommandcodec-2/methods/writeremove-tkey-orleans-journaling-journalstreamwriter-d9c62a19/)
- [WriteSet(TKey, TValue, JournalStreamWriter)](/orleans/docs/api/csharp/microsoft.orleans.journaling/orleans.journaling.json.jsondurabledictionarycommandcodec-2/methods/writeset-tkey-tvalue-orleans-journaling-journalstreamwriter-bf64e70b/)
- [WriteSnapshot(IReadOnlyCollection&lt;KeyValuePair&lt;TKey, TValue&gt;&gt;, JournalStreamWriter)](/orleans/docs/api/csharp/microsoft.orleans.journaling/orleans.journaling.json.jsondurabledictionarycommandcodec-2/methods/writesnapshot-system-collections-generic-ireadonlycollection-system-collections-4a5bef42/)
