From 838ed8229ed13959d9235b5eafae959e8b8421c4 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 27 May 2023 20:36:26 +0200 Subject: Added Node Map Generation algorithm --- src/Data/JLD/Expansion.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/Data/JLD/Expansion.hs') diff --git a/src/Data/JLD/Expansion.hs b/src/Data/JLD/Expansion.hs index ff2d9c3..79a992d 100644 --- a/src/Data/JLD/Expansion.hs +++ b/src/Data/JLD/Expansion.hs @@ -24,7 +24,6 @@ import Data.JLD.Util ( valueContains, valueIsEmptyArray, valueIsNotArray, - valueIsNotNull, valueIsNotString, valueIsScalar, valueIsString, @@ -760,7 +759,7 @@ expandObject maybePropertyContext value = do -- 16. | Just resultType <- KM.lookup (show KeywordType) result -> eoNormalizeObject - <| if valueIsNotArray resultType && valueIsNotNull resultType + <| if valueIsNotArray resultType && resultType /= Null then KM.insert (show KeywordType) (Array <| V.singleton resultType) result else result -- 17. @@ -797,7 +796,7 @@ expandArrayItem item = do case item'' of -- 5.2.3. - Array a -> pure <| V.filter valueIsNotNull a + Array a -> pure <| V.filter (/= Null) a Null -> pure mempty _ -> pure <| V.singleton item'' -- cgit v1.2.3-54-g00ecf