File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ module Data.Argonaut.Core
3535 , toString
3636 , toArray
3737 , toObject
38+ , jNull
3839 , jsonNull
3940 , jsonTrue
4041 , jsonFalse
@@ -49,11 +50,12 @@ module Data.Argonaut.Core
4950
5051import Prelude
5152
52- import Data.Tuple (Tuple )
53- import Data.Maybe (Maybe (..))
5453import Data.Function.Uncurried (Fn5 , runFn5 , Fn7 , runFn7 )
55-
54+ import Data.Maybe ( Maybe (..))
5655import Data.StrMap as M
56+ import Data.Tuple (Tuple )
57+
58+ import Unsafe.Coerce (unsafeCoerce )
5759
5860-- | A Boolean value inside some JSON data. Note that this type is exactly the
5961-- | same as the primitive `Boolean` type; this synonym acts only to help
@@ -195,6 +197,9 @@ foreign import fromObject :: JObject -> Json
195197
196198-- Defaults
197199
200+ jNull :: JNull
201+ jNull = (unsafeCoerce :: Json -> JNull ) jsonNull
202+
198203foreign import jsonNull :: Json
199204
200205jsonTrue :: Json
You can’t perform that action at this time.
0 commit comments