-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Universal JSON AST datastructure
--
-- This library provides only a data-type representing the JSON value
-- tree. It is intended to be used as a shared data-type by all kinds of
-- JSON libraries. Same as we have the "xml-types" package for libraries
-- dealing with XML.
--
-- Now, since the "aeson" Value has been serving this purpose
-- for years, we've intentionally made this type representationally
-- identical to it, making it possible to convert between them at 0
-- runtime cost. This means that we can use those types interchangeably,
-- making it possible to gradually migrate.
--
--
Why displace the "aeson" Value?
--
--
-- - To boost the competition between JSON libraries. Instead of
-- nudging the community to implement its ideas by patching "aeson".
-- After all, competition is the driving force of evolution and hence
-- progress.
-- - Due to so much patching already happening to "aeson", its loss of
-- focus, some questionable design and strive for backwards
-- compatibility, it's becoming bloated. IOW, it's trying to be
-- "everything JSON" but with no careful design or plan and it's tied by
-- its past. With these restrictions it's impossible for "aeson" to ever
-- become a polished library.
--
@package json-ast
@version 0.3.2
-- | This module will never contain any namespace conflicts with Prelude,
-- so it can be imported unqualified.
module JSONAST
-- | JSON value abstract syntax tree.
--
-- It is intended to be used instead of "aeson" Value as lingua
-- franca for JSON libraries, removing the need to depend on "aeson" when
-- all that's needed is a representation of a JSON value.
--
-- Note that this datastructure is representationally identical to
-- "aeson" Value. Meaning that conversions between them can be
-- made at 0 performance cost, (using the unsafeCoerce function).
-- The "aeson-json-ast" package provides a typed interface for such
-- conversions.
data JSON
JSON_Object :: !HashMap Text JSON -> JSON
JSON_Array :: !Vector JSON -> JSON
JSON_String :: !Text -> JSON
JSON_Number :: !Scientific -> JSON
JSON_Bool :: !Bool -> JSON
JSON_Null :: JSON
instance Data.Data.Data JSONAST.JSON
instance GHC.Show.Show JSONAST.JSON
instance GHC.Read.Read JSONAST.JSON
instance GHC.Classes.Eq JSONAST.JSON