summaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/pborman/uuid/json.go
diff options
context:
space:
mode:
Diffstat (limited to 'Godeps/_workspace/src/github.com/pborman/uuid/json.go')
-rw-r--r--Godeps/_workspace/src/github.com/pborman/uuid/json.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/Godeps/_workspace/src/github.com/pborman/uuid/json.go b/Godeps/_workspace/src/github.com/pborman/uuid/json.go
deleted file mode 100644
index 760580a50..000000000
--- a/Godeps/_workspace/src/github.com/pborman/uuid/json.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2014 Google Inc. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package uuid
-
-import "errors"
-
-func (u UUID) MarshalJSON() ([]byte, error) {
- if len(u) == 0 {
- return []byte(`""`), nil
- }
- return []byte(`"` + u.String() + `"`), nil
-}
-
-func (u *UUID) UnmarshalJSON(data []byte) error {
- if len(data) == 0 || string(data) == `""` {
- return nil
- }
- if len(data) < 2 || data[0] != '"' || data[len(data)-1] != '"' {
- return errors.New("invalid UUID format")
- }
- data = data[1 : len(data)-1]
- uu := Parse(string(data))
- if uu == nil {
- return errors.New("invalid UUID format")
- }
- *u = uu
- return nil
-}