---
title: "System::Text::Json::Serialization::JsonDictionaryConverter\u003c TDictionary, TKey, TValue \u003e::OnTryWrite method"
url: "https://reference.aspose.com/pdf/cpp/system.text.json.serialization/jsondictionaryconverter_tdictionarytkeytvalue_/ontrywrite/"
product: "Aspose.PDF for C++ API Reference"
description: "How to use OnTryWrite method of System::Text::Json::Serialization::JsonDictionaryConverter\u003c TDictionary, TKey, TValue \u003e class in C++."
---

## JsonDictionaryConverter< TDictionary, TKey, TValue >::OnTryWrite method




```cpp
bool System::Text::Json::Serialization::JsonDictionaryConverter<TDictionary, TKey, TValue>::OnTryWrite(System::SharedPtr<Utf8JsonWriter> writer, TDictionary dictionary, System::SharedPtr<JsonSerializerOptions> options, WriteStack &state) override
```

## See Also

* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Utf8JsonWriter](../../../system.text.json/utf8jsonwriter/)
* Class [JsonSerializerOptions](../../../system.text.json/jsonserializeroptions/)
* Class [WriteStack](../../../system.text.json/writestack/)
* Class [JsonDictionaryConverter< TDictionary, TKey, TValue >](../)
* Namespace [System::Text::Json::Serialization](../../)
* Library [Aspose.PDF for C++](../../../)
