Skip to content

refactor: avoid json marshal protojson unmarshal roundtrip#89

Merged
phisco merged 2 commits intocrossplane-contrib:mainfrom
sn-atmos:avoid-json-roundtrip
Feb 20, 2026
Merged

refactor: avoid json marshal protojson unmarshal roundtrip#89
phisco merged 2 commits intocrossplane-contrib:mainfrom
sn-atmos:avoid-json-roundtrip

Conversation

@tenstad
Copy link
Contributor

@tenstad tenstad commented Feb 18, 2026

Description of your changes

Fixes the TODO in https://github.com/[crossplane-contrib/function-extra-resources](https://github.com/crossplane-contrib/function-extra-resources/blob/7eb0ff97188f79a44afd8506a9cfadf5d60a75b0/fn.go#L91-L93)/blob/7eb0ff97188f79a44afd8506a9cfadf5d60a75b0/fn.go#L91-L93

by returning map[string]any from verifyAndSortExtras and using structpb.NewStruct.

Note: if it's desired to keep the map[string][]unstructured.Unstructured output type of verifyAndSortExtras, I'm happy to revert the 2nd commit.

I have:

Signed-off-by: Amund Tenstad <github@amund.io>
Signed-off-by: Amund Tenstad <github@amund.io>
@tenstad tenstad changed the title Avoid json roundtrip refactor: avoid json marshal protojson unmarshal roundtrip Feb 18, 2026
Copy link
Collaborator

@phisco phisco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tenstad!

@phisco phisco merged commit 92630bd into crossplane-contrib:main Feb 20, 2026
6 checks passed
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.

2 participants