Evaluate replacing JsonConvert serialization
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 25/100
Piste de recherche
Commencez par retracer comment savedState de Installer est sérialisé et désérialisé, puis comparez les options de sérialiseur pour netstandard2.0 évoquées dans l’issue, notamment NetDataContractSerializer et BinaryFormatter. Vérifiez si un IDictionary arbitraire et l’état d’un Installer enfant peuvent effectuer un aller-retour sans Json.NET ; le travail est terminé lorsqu’un remplacement compatible a été identifié ou qu’il a été documenté pourquoi la dépendance doit être conservée.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
It looks like you're just using JSON.net to serialize IDictionary in savedState and this could be accomplished with built-in serializers that would remove the dependency on JSON.net (so that a different version can be used or just not bring that dependency along with someone using System.Configuration.Install).
I looked at the reference source and the built-in classes use NetDataContractSerializer which can serialize/deserialize arbitrary types in an IDictionary. We don't have that in netstandard2.0. Another possibility is BinaryFormatter, but that requires ISerializable which IDictionary is not. The concrete type is Hashtable in the underlying implementation for installers.
@flamencist thought this approach might work, but it relies on ToString() to put it in a key value store. Since IDictionary (and Hashtable) can hold any object, this doesn't really work. Some objects may not have a sensible ToString() which would end up with the type name in the output, and they can't really be deserialized in this manner.
In the Installer source I looked at, it appeared that it was putting an integer in there for the count of Installers and then saving all the child Installer states (which can be any object since anyone can inherit Installer).
The reason JsonConvert works is that it serializes the type information too. Is it possible to replace it with something we have in netstandard2.0 so that we don't have to bring along a JSON.Net dependency?
- Langage dominant
- C#
- Étoiles
- 26
- Forks
- 12
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de flamencist/Core.System.Configuration.Install
-
Difficulté 3/5 1-2 jours Accessibilité débutants 35/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 30/100
flamencist/Core.System.Configuration.Install#11 · 2 réactions ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 20/100
flamencist/Core.System.Configuration.Install#9 · 1 commentaire ·
-
Difficulté 4/5 3-5 jours Accessibilité débutants 25/100
flamencist/Core.System.Configuration.Install#8 · 3 commentaires ·
Toutes les issues de flamencist/Core.System.Configuration.Install
Issues similaires
-
type/automation type/tech-debt
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
-
t/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
ci-failure-cause test-failure
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
area:auth FE mvp P3
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
klasolsson81/jobbliggaren#1788 ·