Les deux révisions précédentesRévision précédente | |
lang:csharp:serialisation [2020/04/27 08:32] – Conversion de <note> vers <WRAP> root | lang:csharp:serialisation [2020/04/27 08:39] (Version actuelle) – mhtml -> html root |
---|
by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer. | by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer. |
| |
[[https://stackoverflow.com/questions/30210393/exception-during-the-serialization-type-with-data-contract-name-is-not-expecte/30214583|Exception during the serialization - Type with data contract name is not expected]] {{ :lang:csharp:serialisation:c_-_exception_during_the_serialization_-_type_with_data_contract_name_is_not_expected_-_stack_overflow.mhtml |Archive du 04/03/2019}} | [[https://stackoverflow.com/questions/30210393/exception-during-the-serialization-type-with-data-contract-name-is-not-expecte/30214583|Exception during the serialization - Type with data contract name is not expected]] {{ :lang:csharp:serialisation:c_-_exception_during_the_serialization_-_type_with_data_contract_name_is_not_expected_-_stack_overflow_2020-04-27_8_18_17_am_.html |Archive du 13/05/2015 le 27/04/2020}} |
| |
[[https://blogs.msdn.microsoft.com/youssefm/2009/04/22/understanding-known-types/|Understanding Known Types]] {{ :lang:csharp:serialisation:understanding_known_types_youssef_m_s_blog.mhtml |Archive du 04/03/2019}} | [[https://docs.microsoft.com/en-us/archive/blogs/youssefm/understanding-known-types/|Understanding Known Types]] {{ :lang:csharp:serialisation:understanding_known_types_microsoft_docs_2020-04-27_8_18_33_am_.html |Archive du 22/04/2009 le 27/04/2020}} |
| |
====Sérialisation en XML==== | ====Sérialisation en XML==== |
</code> | </code> |
| |
[[https://docs.microsoft.com/fr-fr/dotnet/framework/wcf/samples/datacontractserializer-sample|DataContractSerializer, exemple]] {{ :lang:csharp:serialisation:datacontractserializer_exemple_microsoft_docs.mhtml |Archive du 04/03/2019}} | [[https://docs.microsoft.com/fr-fr/dotnet/framework/wcf/samples/datacontractserializer-sample|DataContractSerializer, exemple]] {{ :lang:csharp:serialisation:datacontractserializer_exemple_-_wcf_microsoft_docs_2020-04-27_8_18_42_am_.html |Archive du 03/30/2017 le 27/04/2020}} |
| |
====Sérialisation en JSON==== | ====Sérialisation en JSON==== |
C'est la même chose avec ''DataContractJsonSerializer''. | C'est la même chose avec ''DataContractJsonSerializer''. |
| |
[[https://docs.microsoft.com/fr-fr/dotnet/framework/wcf/feature-details/how-to-serialize-and-deserialize-json-data|Procédure : Sérialiser et désérialiser des données JSON]] {{ :lang:csharp:serialisation:procedure_serialiser_et_deserialiser_des_donnees_json_microsoft_docs.mhtml |Archive du 04/03/2019}} | [[https://docs.microsoft.com/fr-fr/dotnet/framework/wcf/feature-details/how-to-serialize-and-deserialize-json-data|How to use DataContractJsonSerializer]] {{ :lang:csharp:serialisation:comment_utiliser_datacontractjsonserializer_-_wcf_microsoft_docs_2020-04-27_8_19_16_am_.html |Archive du 25/03/2019 le 27/04/2020}} |
| |
| <WRAP center round important 60%> |
| TODO : Cette classe est dépréciée au profit du namespace ''System.Text.Json''. |
| </WRAP> |
| |
====Initialisation dans le constructeur==== | ====Initialisation dans le constructeur==== |