RawExtension was not properly marshalled
MarshalJSON can't use a pointer to a struct for RawExtension: http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go
This commit is contained in:
@@ -26,6 +26,8 @@ func (re *RawExtension) UnmarshalJSON(in []byte) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (re *RawExtension) MarshalJSON() ([]byte, error) {
|
||||
// Marshal may get called on pointers or values, so implement MarshalJSON on value.
|
||||
// http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go
|
||||
func (re RawExtension) MarshalJSON() ([]byte, error) {
|
||||
return re.RawJSON, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user