-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | conferer's source for reading json files -- -- Library to abstract the parsing of many haskell config values from -- different config sources @package conferer-source-json @version 0.4.0.0 module Conferer.Source.JSON -- | Default SourceCreator which usese files with -- config/{env}.json template, if the file is not present it -- will behave like the null source (it has no keys) but if the file -- doesn't have valid json it will throw an error mkJsonSource :: SourceCreator -- | Just like mkJsonSource but accepts the json value as a -- parameter mkJsonSource' :: Value -> SourceCreator -- | Traverse a Value using a Key to get a value for conferer -- (Text). -- -- This function can nest objects and arrays when keys are nested -- --
-- traverseJSON "a.b" {a: {b: 12}} == Just "12"
-- traverseJSON "a.b" {a: {b: false}} == Just "false"
-- traverseJSON "a" {a: {b: false}} == Nothing
-- traverseJSON "1" [false, true] == Just "true"
-- traverseJSON "0.a" [{a: "hi"}] == Just "hi"
-- traverseJSON "0" [] == Nothing
--
traverseJSON :: Key -> Value -> Maybe Text
-- | Because we use an old version of aeson
resultToMaybe :: Result a -> Maybe a
valueToText :: Value -> Maybe Text
boolToString :: Bool -> Text