Added JSON Marshal <=> Unmarshal Support

Implemented Marshaler and Unmarshaler interfaces to support custom
serialization to base64 encoded string using the FromBytes
functionality. In order to efficiently support this a new fromBytes
method was added that encapsulates the bulk of the functionality
previously in FromBytes.