Closed negz closed 6 months ago
Makes sense to me making it the default behavior, should we add options to all functions ending up in a AsObject being called?
Makes sense to me making it the default behavior, should we add options to all functions ending up in a AsObject being called?
I think if we're okay making this the default behavior we can defer adding options at all for the time being.
Description of your changes
Closes https://github.com/crossplane/function-sdk-go/pull/121
@phisco This is how I would wrap JSON options in our own, to avoid coupling ourselves to the upstream (and not yet stable) json-experiment implementation too strongly.
I'm opening as a draft though because after writing this it occurred to me that I'd prefer to make
RejectUnknownMembers
the default behavior forAsObject
. My rationale:protojson.Marshal
(i.e.AsStruct
).I have:
make reviewable
to ensure this PR is ready for review.How has this code been tested