Skip to content

refactor: avoid json marshal protojson unmarshal roundtrip#89

Open
tenstad wants to merge 2 commits intocrossplane-contrib:mainfrom
sn-atmos:avoid-json-roundtrip
Open

refactor: avoid json marshal protojson unmarshal roundtrip#89
tenstad wants to merge 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
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.

1 participant

Comments