PowerShell / PowerShell/PowerShell-RFC

ConvertFrom/To-Hashtable and/or ConvertTo-PSCustomObject cmdlets

Abierto
#159 5 comentarios 4 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Up-for-Grabs
Lenguaje dominante
PowerShell
Estrellas
467
Forks
140
Merge medio
9 min
PR fusionados (30 d)
1

Descripción

Related discussion in #109, specifically this comment:

Finally got around to reviewing this with @PowerShell/powershell-committee.

It sounds like the problem that's being solved here is to convert nested hashtables to PSCustomObjects when the keys are all strings (when they're not strings, conversion will likely result in key collision due to ToString() returning type names).

To that end, we think it's more generically useful to build a ConvertFrom-Hashtable cmdlet that would allow more generic and custom conversion of hashtables to PSCustomObjects and potentially other types using constructors that expect specific hashtable "schemas". Another possible implementation is to do a ConvertTo-PSCustomObject that does more custom handling (and these aren't mutually exclusive). Additionally, a ConvertTo-Hashtable is probably useful.

We don't have this on our radar right now, but if someone wants to give a go at a ConvertFrom-Hashtable RFC and implementation, go for it.

We think the scenario we're trying to address is primarily casting nested hashtables of hashtables into PSCustomObjects (or possibly even other types).

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con la discusión relacionada en el issue #109, especialmente con el comentario enlazado, para entender los escenarios de conversión propuestos y el alcance aún no resuelto. Determina si el trabajo debería abarcar ConvertFrom-Hashtable, ConvertTo-PSCustomObject, ConvertTo-Hashtable o varios cmdlets; para darlo por terminado sería necesario un RFC enfocado, listo para recibir comentarios del PowerShell Committee y someterse a votación.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
powershell
Área
cli
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.