Remove unnecessary EmbeddedObjects

Clarify the tests in embedded_test.go to indicate that unmarshalling
of an internal object (runtime.EmbeddedObject) will not work.  Instead,
consumers should decode raw external objects.
This commit is contained in:
Clayton Coleman
2014-09-18 06:08:10 -04:00
parent e3da2ba2c8
commit fece926e2b
6 changed files with 32 additions and 176 deletions

View File

@@ -121,7 +121,7 @@ func (self *Scheme) embeddedObjectToRawExtension(in *EmbeddedObject, out *RawExt
}
// rawExtensionToEmbeddedObject does the conversion you would expect from the name, using the information
// given in conversion.Scope. It's placed in the DefaultScheme as a ConversionFunc to enable plugins;
// given in conversion.Scope. It's placed in all schemes as a ConversionFunc to enable plugins;
// see the comment for RawExtension.
func (self *Scheme) rawExtensionToEmbeddedObject(in *RawExtension, out *EmbeddedObject, s conversion.Scope) error {
if len(in.RawJSON) == 4 && string(in.RawJSON) == "null" {