diff --git a/IPv6Addr.cabal b/IPv6Addr.cabal
--- a/IPv6Addr.cabal
+++ b/IPv6Addr.cabal
@@ -1,5 +1,5 @@
 name:                IPv6Addr
-version:             0.6.3
+version:             0.7.0
 synopsis:            Library to deal with IPv6 address text representations.
 description:         Library to deal with IPv6 address text representations, canonization and manipulations.
 homepage:            https://github.com/MichelBoucey/IPv6Addr
@@ -7,7 +7,7 @@
 license-file:        LICENSE
 author:              Michel Boucey
 maintainer:          michel.boucey@cybervisible.fr
-copyright:           (c) 2011-2016 - Michel Boucey
+copyright:           (c) 2011-2017 - Michel Boucey
 category:            Network
 build-type:          Simple
 extra-source-files:  README.md
@@ -18,14 +18,18 @@
   Location: https://github.com/MichelBoucey/IPv6Addr.git
 
 library
-  exposed-modules:  Text.IPv6Addr, Text.IPv6Addr.Types, Text.IPv6Addr.Manip, Text.IPv6Addr.Internal
+  exposed-modules:  Text.IPv6Addr
+                  , Text.IPv6Addr.Manip
+                  , Text.IPv6Addr.Types
+  other-modules:    Text.IPv6Addr.Internal
   other-extensions: OverloadedStrings
-  build-depends:    base >=4.6 && <5
-                  , text >=1.1 && <1.3
-                  , iproute >=1.3 && <1.8
-                  , network >=2.5 && <2.7
-                  , random >=1.0 && <=1.1
-                  , attoparsec >=0.12 && <0.14
+  build-depends:    base >=4.8 && < 5
+                  , text >=1.1 && < 1.3
+                  , iproute >=1.3 && < 1.8
+                  , network >=2.5 && < 2.7
+                  , random >=1.0 && <= 1.1
+                  , attoparsec >=0.12 && < 0.14
+                  , aeson >= 0.8.0.2 && < 1.2
                   , network-info >=0.2 && <=0.3
   default-language: Haskell2010
   GHC-Options:      -Wall
diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2011-2016, Michel Boucey
+Copyright (c) 2011-2017, Michel Boucey
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/Text/IPv6Addr.hs b/Text/IPv6Addr.hs
--- a/Text/IPv6Addr.hs
+++ b/Text/IPv6Addr.hs
@@ -23,6 +23,7 @@
 
     ) where
 
+import           Data.Aeson
 import           Data.IP                (IPv6)
 import           Data.Maybe             (fromJust, isNothing)
 import           Data.Monoid            ((<>))
@@ -38,6 +39,16 @@
 instance Eq IPv6Addr where
   (==) (IPv6Addr a) (IPv6Addr b) =
     show (maybePureIPv6Addr a) == show (maybePureIPv6Addr b)
+
+instance ToJSON IPv6Addr where
+  toJSON (IPv6Addr a) = String a
+
+instance FromJSON IPv6Addr where
+  parseJSON (String s) =
+    case maybeIPv6Addr s of
+      Just a  -> pure a
+      Nothing -> fail "Not An IPv6 Address"
+  parseJSON _          = fail "JSON String Expected"
 
 -- | Returns 'Just' the text representation of a canonized
 -- 'IPv6Addr' in conformation with RFC 5952, or 'Nothing'.
diff --git a/Text/IPv6Addr/Manip.hs b/Text/IPv6Addr/Manip.hs
--- a/Text/IPv6Addr/Manip.hs
+++ b/Text/IPv6Addr/Manip.hs
@@ -27,15 +27,17 @@
   mapM getHex m >>= \g -> return $ SixteenBit $ T.dropWhile (=='0') $ T.pack g
   where
     getHex c
-        | c == '_'  = intToDigit <$> randomRIO (0,15)
-        | otherwise = return c
+      | c == '_'  = getDigit
+      | otherwise = pure c
 
 -- | Generates a random partial 'IPv6Addr' with n 'SixteenBit'.
 randPartialIPv6Addr :: Int -> IO [IPv6AddrToken]
-randPartialIPv6Addr n
-  | n > 0 && n < 9 =
-    intersperse Colon <$> replicateM n (randIPv6AddrChunk "____")
-  | otherwise      = return []
+randPartialIPv6Addr n =
+  if n > 0 && n < 9 
+    then
+      intersperse Colon <$>
+        replicateM n (SixteenBit <$> T.pack <$> replicateM 4 getDigit)
+    else pure []
 
 -- | Given a MAC address, returns 'Just' the corresponding 'IPv6AddrToken' list, or 'Nothing'.
 --
@@ -75,6 +77,9 @@
     (lookup s <$> networkInterfacesMacAddrList)
   where
     networkInterfacesMacAddrList = getNetworkInterfaces >>=
-      \n -> return $ map networkInterfacesMac n
+      \n -> return (networkInterfacesMac <$> n)
       where networkInterfacesMac (NetworkInterface n _ _ m) = (n,m)
+
+getDigit :: IO Char
+getDigit = intToDigit <$> randomRIO (0,15)
 
diff --git a/Text/IPv6Addr/Types.hs b/Text/IPv6Addr/Types.hs
--- a/Text/IPv6Addr/Types.hs
+++ b/Text/IPv6Addr/Types.hs
@@ -8,10 +8,10 @@
   show (IPv6Addr a) = T.unpack a
 
 data IPv6AddrToken
-  = SixteenBit !T.Text  -- ^ A four hexadecimal digits group representing a 16-Bit chunk
+  = SixteenBit  !T.Text -- ^ A four hexadecimal digits group representing a 16-Bit chunk
   | AllZeros            -- ^ An all zeros 16-Bit chunk
   | Colon               -- ^ A separator between 16-Bit chunks
   | DoubleColon         -- ^ A double-colon stands for a unique compression of many consecutive 16-Bit chunks
-  | IPv4Addr !T.Text    -- ^ An embedded IPv4 address as representation of the last 32-Bit
+  | IPv4Addr    !T.Text -- ^ An embedded IPv4 address as representation of the last 32-Bit
   deriving (Eq, Show)
 
diff --git a/tests/Main.hs b/tests/Main.hs
--- a/tests/Main.hs
+++ b/tests/Main.hs
@@ -25,6 +25,7 @@
   , (~?=) (maybeIPv6Addr "::1") (Just (IPv6Addr "::1"))
   , (~?=) (maybeIPv6Addr "::1:") Nothing
   , (~?=) (maybeIPv6Addr "0000:0000:0000:0000:0000:0000:0000:0001") (Just (IPv6Addr "::1"))
+  , (~?=) (maybeIPv6Addr "0:0:0:0:0:0:0:1") (Just (IPv6Addr "::1"))
   , (~?=) (maybeIPv6Addr "a") Nothing
   , (~?=) (maybeIPv6Addr "ab") Nothing
   , (~?=) (maybeIPv6Addr "abc") Nothing
