nu7hatch/gouuid — pull request #7 by pjvds (2013-07-27 10:35:49+00:00)
Title: Adds JSON marshalling support

I am using the gouuid library for the identifiers of my objects. These objects get stored in a document store and are exposed in a REST api. Both API and database marshal the object to the JSON format. Currently the `uuid.UUID` does not implement the [`json.Marshaller`](http://golang.org/pkg/encoding/json/#Marshaler) and [`json.Unmarshaller`](http://golang.org/pkg/encoding/json/#Unmarshaler) interface. This pull request changes that.

I have added the `MarshalJSON` and `UnmarshalJSON` to the `uuid.UUID` type, which are covered by tests. The JSON value is a hex string as returned by the `uuid.UUID.String` method.