json-ast (empty) → 0.1
raw patch · 4 files changed
+101/−0 lines, 4 filesdep +basedep +scientificdep +textsetup-changed
Dependencies added: base, scientific, text, unordered-containers, vector
Files
- LICENSE +22/−0
- Setup.hs +2/−0
- json-ast.cabal +52/−0
- library/JSON/AST.hs +25/−0
+ LICENSE view
@@ -0,0 +1,22 @@+Copyright (c) 2016, Nikita Volkov++Permission is hereby granted, free of charge, to any person+obtaining a copy of this software and associated documentation+files (the "Software"), to deal in the Software without+restriction, including without limitation the rights to use,+copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the+Software is furnished to do so, subject to the following+conditions:++The above copyright notice and this permission notice shall be+included in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR+OTHER DEALINGS IN THE SOFTWARE.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ json-ast.cabal view
@@ -0,0 +1,52 @@+name:+ json-ast+version:+ 0.1+synopsis:+ Universal JSON AST datastructure+description:+homepage:+ https://github.com/nikita-volkov/json-ast +bug-reports:+ https://github.com/nikita-volkov/json-ast/issues +author:+ Nikita Volkov <nikita.y.volkov@mail.ru>+maintainer:+ Nikita Volkov <nikita.y.volkov@mail.ru>+copyright:+ (c) 2016, Nikita Volkov+license:+ MIT+license-file:+ LICENSE+build-type:+ Simple+cabal-version:+ >=1.10+++source-repository head+ type:+ git+ location:+ git://github.com/nikita-volkov/json-ast.git+++library+ hs-source-dirs:+ library+ default-extensions:+ NoImplicitPrelude, DeriveDataTypeable+ default-language:+ Haskell2010+ other-modules:+ exposed-modules:+ JSON.AST+ build-depends:+ -- data:+ vector >= 0.10 && < 0.12,+ text >= 1 && < 2,+ scientific >= 0.3 && < 0.4,+ unordered-containers >= 0.2 && < 0.3,+ -- general:+ base >= 4.6 && < 4.9
+ library/JSON/AST.hs view
@@ -0,0 +1,25 @@+module JSON.AST where++import Prelude+import Data.Data (Data, Typeable)+import Data.HashMap.Strict (HashMap)+import Data.Vector (Vector)+import Data.Text (Text)+import Data.Scientific (Scientific)+++-- |+-- A JSON value AST.+-- +-- Note that this datastructure is identical to \"aeson\" Value.+-- Until \"aeson\" implements the dependency on \"json-ast\",+-- you can use "Unsafe.Coerce.unsafeCoerce" to work with it,+-- thus sidestepping the redundant conversions.+data JSON =+ Object !(HashMap Text JSON) |+ Array !(Vector JSON) |+ String !Text |+ Number !Scientific |+ Bool !Bool |+ Null+ deriving (Eq, Read, Show, Typeable, Data)