-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | JSON encoding of ekg metrics
--   
--   Encodes ekg metrics as JSON, using the same encoding as used by the
--   ekg package, thus allowing ekg metrics to be served by other HTTP
--   servers than the one used by the ekg package.
@package ekg-json
@version 0.1.0.6


-- | Encoding of ekg metrics as JSON. The encoding defined by the functions
--   in this module are standardized and used by the ekg web UI. The
--   purpose of this module is to let other web servers and frameworks than
--   the one used by the ekg package expose ekg metrics.
module System.Metrics.Json

-- | Encode metrics as nested JSON objects. Each "." in the metric name
--   introduces a new level of nesting. For example, the metrics
--   <tt>[("foo.bar", 10), ("foo.baz", "label")]</tt> are encoded as
--   
--   <pre>
--   {
--     "foo": {
--       "bar": {
--         "type:", "c",
--         "val": 10
--       },
--       "baz": {
--         "type": "l",
--         "val": "label"
--       }
--     }
--   }
--   </pre>
sampleToJson :: Sample -> Value

-- | Encodes a single metric as a JSON object. Example:
--   
--   <pre>
--   {
--     "type": "c",
--     "val": 89460
--   }
--   </pre>
valueToJson :: Value -> Value

-- | Newtype wrapper that provides a <a>ToJSON</a> instances for the
--   underlying <a>Sample</a> without creating an orphan instance.
newtype Sample
Sample :: Sample -> Sample

-- | Newtype wrapper that provides a <a>ToJSON</a> instances for the
--   underlying <a>Value</a> without creating an orphan instance.
newtype Value
Value :: Value -> Value
instance GHC.Show.Show System.Metrics.Json.Value
instance GHC.Show.Show System.Metrics.Json.Sample
instance Data.Aeson.Types.ToJSON.ToJSON System.Metrics.Json.Sample
instance Data.Aeson.Types.ToJSON.ToJSON System.Metrics.Json.Value
