JSON marshalling not working with the inline
and omitempty
options
#161
Labels
bug
Something isn't working
inline
and omitempty
options
#161
What happened?
When you use a specific field in a resource that has the
inline
and theomitempty
field specified, the json marshaling will fail with the error:This error is for example triggered when using the
set
field of a release usingprovider-helm
How can we reproduce it?
v1beta1.Release
from provider-helmSetVal
object in the release like this:Why does this fail?
The
NamespacedName
field in provider-helm has the following json fields:,inline,omitempty
(see: https://github.com/crossplane-contrib/provider-helm/blob/main/apis/release/v1beta1/types.go#L50)However, this is currently not supported by the json-library used in this function-sdk-go (see: https://github.com/go-json-experiment/json/blob/master/fields.go#L105-L111)
The error is triggered by calling the
json.Marshal()
function here: https://github.com/crossplane/function-sdk-go/blob/v0.3.0-rc.0/resource/composed/composed.go#L76What environment did it happen in?
Crossplane version: 1.17
Provider-Helm: v0.19.0
Function-sdk-go: v0.3.0-rc.0
go-json-experiment: v0.0.0-20231102232822-2e55bd4e08b0
The text was updated successfully, but these errors were encountered: