Commit 067ecb4b authored by deads2k's avatar deads2k

expose unstructured scheme as codec

parent ca30f386
...@@ -26,12 +26,10 @@ import ( ...@@ -26,12 +26,10 @@ import (
// UnstructuredJSONScheme is capable of converting JSON data into the Unstructured // UnstructuredJSONScheme is capable of converting JSON data into the Unstructured
// type, which can be used for generic access to objects without a predefined scheme. // type, which can be used for generic access to objects without a predefined scheme.
// TODO: move into serializer/json. // TODO: move into serializer/json.
var UnstructuredJSONScheme Decoder = unstructuredJSONScheme{} var UnstructuredJSONScheme Codec = unstructuredJSONScheme{}
type unstructuredJSONScheme struct{} type unstructuredJSONScheme struct{}
var _ Codec = unstructuredJSONScheme{}
func (s unstructuredJSONScheme) Decode(data []byte, _ *unversioned.GroupVersionKind, _ Object) (Object, *unversioned.GroupVersionKind, error) { func (s unstructuredJSONScheme) Decode(data []byte, _ *unversioned.GroupVersionKind, _ Object) (Object, *unversioned.GroupVersionKind, error) {
unstruct := &Unstructured{} unstruct := &Unstructured{}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment