@@ -16,6 +16,23 @@
1616--
1717-- For documentation on the @aeson@ types, functions, classes, and
1818-- operators, please see the @Data.Aeson@ module of the @aeson@ package.
19+--
20+-- == Examples
21+--
22+-- Decode into a data structure by specifying the desired type to the 'decode'
23+-- method.
24+--
25+-- > {-# LANGUAGE OverloadedStrings #-}
26+-- >
27+-- > import qualified Data.Yaml as Y
28+-- >
29+-- > main = do
30+-- > putStrLn . show $ (Y.decode "[1,2,3]" :: Maybe [Integer])
31+--
32+-- You can go one step further and decode into a custom type by implementing
33+-- 'FromJSON' for that type. This is also appropriate where extra
34+-- normalization, formatting or manipulation of the YAML is required on decode.
35+
1936#if (defined (ghcjs_HOST_OS))
2037module Data.Yaml {-# WARNING "GHCJS is not supported yet (will break at runtime once called)." #-}
2138#else