diff --git a/Data/Object.hs b/Data/Object.hs
new file mode 100644
--- /dev/null
+++ b/Data/Object.hs
@@ -0,0 +1,90 @@
+{-# LANGUAGE FlexibleInstances #-}
+{-# LANGUAGE TypeSynonymInstances #-}
+{-# LANGUAGE OverlappingInstances #-}
+---------------------------------------------------------
+--
+-- Module        : Web.ClientSession
+-- Copyright     : Michael Snoyman
+-- License       : BSD3
+--
+-- Maintainer    : Michael Snoyman <michael@snoyman.com>
+-- Stability     : Stable
+-- Portability   : portable
+--
+-- These objects show up in different places, eg JSON, Yaml.
+-- By providing a representation in a separate repository,
+-- other libraries can share a single representation of
+-- these structures.
+--
+---------------------------------------------------------
+module Data.Object
+    ( Object (..)
+    , FromObject (..)
+    , ToObject (..)
+    , oLookup
+    ) where
+
+import qualified Data.ByteString as B
+import Data.ByteString.Class
+import Control.Arrow
+
+data Object =
+    Mapping [(B.ByteString, Object)]
+    | Sequence [Object]
+    | Scalar B.ByteString
+    deriving (Show)
+
+class ToObject a where
+    toObject :: a -> Object
+
+class FromObject a where
+    fromObject :: Monad m => Object -> m a
+
+bsFromObject :: (Monad m, StrictByteString bs) => Object -> m bs
+bsFromObject (Scalar bs) = return $ fromStrictByteString bs
+bsFromObject _ = fail "Attempt to extract a scalar from non-scalar"
+
+instance ToObject String where
+    toObject = Scalar . toStrictByteString
+
+instance FromObject String where
+    fromObject = bsFromObject
+
+instance ToObject B.ByteString where
+    toObject = Scalar
+
+instance FromObject B.ByteString where
+    fromObject = bsFromObject
+
+instance ToObject o => ToObject [o] where
+    toObject = Sequence . map toObject
+
+instance FromObject o => FromObject [o] where
+    fromObject (Sequence os) = mapM fromObject os
+    fromObject _ = fail "Attempt to extract a sequence from non-sequence"
+
+instance (StrictByteString bs, ToObject o) => ToObject [(bs, o)] where
+    toObject = Mapping . map (toStrictByteString *** toObject)
+
+instance (StrictByteString bs, FromObject o) => FromObject [(bs, o)] where
+    fromObject (Mapping pairs) =
+        mapM (liftSnd . (fromStrictByteString *** fromObject)) pairs
+    fromObject _ = fail "Attempt to extract a mapping from non-mapping"
+
+instance ToObject Object where
+    toObject = id
+
+instance FromObject Object where
+    fromObject = return
+
+liftSnd :: Monad m => (a, m b) -> m (a, b)
+liftSnd (a, b) = b >>= \b' -> return (a, b')
+
+oLookup :: (Monad m, Eq a, Show a, FromObject b)
+        => a -- ^ key
+        -> [(a, Object)]
+        -> m b
+oLookup key pairs =
+    case lookup key pairs of
+        Nothing -> fail $ "Key not found: " ++ show key
+        Just x -> fromObject x
diff --git a/LICENSE b/LICENSE
new file mode 100644
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,25 @@
+The following license covers this documentation, and the source code, except
+where otherwise indicated.
+
+Copyright 2008, Michael Snoyman. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/Setup.lhs b/Setup.lhs
new file mode 100644
--- /dev/null
+++ b/Setup.lhs
@@ -0,0 +1,7 @@
+#!/usr/bin/env runhaskell
+
+> module Main where
+> import Distribution.Simple
+
+> main :: IO ()
+> main = defaultMain
diff --git a/data-object.cabal b/data-object.cabal
new file mode 100644
--- /dev/null
+++ b/data-object.cabal
@@ -0,0 +1,23 @@
+name:            data-object
+version:         0.0.0
+license:         BSD3
+license-file:    LICENSE
+author:          Michael Snoyman <michael@snoyman.com>
+maintainer:      Michael Snoyman <michael@snoyman.com>
+synopsis:        Represent hierachichal structures, called objects in JSON.
+description:     These objects show up in different places, eg JSON, Yaml.
+                 By providing a representation in a separate repository,
+                 other libraries can share a single representation of
+                 these structures.
+category:        Data
+stability:       unstable
+cabal-version:   >= 1.2
+build-type:      Simple
+homepage:        http://github.com/snoyberg/data-object/tree/master
+
+library
+    build-depends:   base >= 4 && < 5,
+                     bytestring-class,
+                     bytestring >= 0.9.1.4 && < 1
+    exposed-modules: Data.Object
+    ghc-options:     -Wall
