Skip to content

Commit ccc475e

Browse files
Improve DictionaryKeyTypeNotSupported error message (#93553)
* Improve DictionaryKeyTypeNotSupported message Fix #93406 * Improve error message Co-authored-by: Eirik Tsarpalis <[email protected]> --------- Co-authored-by: Eirik Tsarpalis <[email protected]>
1 parent 45ed0ab commit ccc475e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/System.Text.Json/src/Resources/Strings.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@
526526
<value>The value cannot be 'JsonIgnoreCondition.Always'.</value>
527527
</data>
528528
<data name="DictionaryKeyTypeNotSupported" xml:space="preserve">
529-
<value>The type '{0}' is not a supported dictionary key using converter of type '{1}'.</value>
529+
<value>The type '{0}' is not a supported dictionary key using converter of type '{1}'. Custom converters can add support for dictionary key serialization by overriding the 'ReadAsPropertyName' and 'WriteAsPropertyName' methods.</value>
530530
</data>
531531
<data name="IgnoreConditionOnValueTypeInvalid" xml:space="preserve">
532532
<value>The ignore condition 'JsonIgnoreCondition.WhenWritingNull' is not valid on value-type member '{0}' on type '{1}'. Consider using 'JsonIgnoreCondition.WhenWritingDefault'.</value>

0 commit comments

Comments
 (0)