Skip to content

Conversation

@gabriel-samfira
Copy link
Member

@gabriel-samfira gabriel-samfira commented Feb 20, 2025

For PSObjects that are not dictionaries or PSCustomObjects, pass the object directly to the base serializer.

It seems that the ConvertFrom-Json commandlet wraps all objects within a list in a PSObject.

Fixes: #185
Fixes: #182

For PSObjects that are not dictionaries or PSCustomObjects, pass the
object directly to the base serializer.

Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
@gabriel-samfira gabriel-samfira force-pushed the fix-psobject-serialization branch from c2e85cf to 86bb4d6 Compare February 20, 2025 12:31
Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
@gabriel-samfira
Copy link
Member Author

Merging as is. Will add more tests later as time permits.

@gabriel-samfira gabriel-samfira merged commit e54508c into cloudbase:master Feb 27, 2025
7 checks passed
@gabriel-samfira gabriel-samfira deleted the fix-psobject-serialization branch February 27, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug when converting from JSON and Powershell lists to YAML since version 0.4.8 Depth for Object to use in ConvertTo-Yaml changed from 0.4.2 to 0.4.12

1 participant