summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Compile/PGFtoJSON.hs
diff options
context:
space:
mode:
authorJohn J. Camilleri <john@digitalgrammars.com>2019-07-10 08:49:00 +0200
committerJohn J. Camilleri <john@digitalgrammars.com>2019-07-10 08:49:00 +0200
commiteab9fb88aaa5408c342927693d8593f1e0ba2b91 (patch)
treea9487e62ff440997abf0f56b8bd2c06c1650932e /src/compiler/GF/Compile/PGFtoJSON.hs
parentacd4a5e8cd3e75b9aaa07b36442406b392520ede (diff)
Minor renamings in JSON format
Diffstat (limited to 'src/compiler/GF/Compile/PGFtoJSON.hs')
-rw-r--r--src/compiler/GF/Compile/PGFtoJSON.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/GF/Compile/PGFtoJSON.hs b/src/compiler/GF/Compile/PGFtoJSON.hs
index 3fd3b60cb..e634dae67 100644
--- a/src/compiler/GF/Compile/PGFtoJSON.hs
+++ b/src/compiler/GF/Compile/PGFtoJSON.hs
@@ -81,16 +81,16 @@ concrete2json (c,cnc) = (showCId c,obj)
, ("productions", JSON.makeObj [ (show cat, JSArray (map frule2json (Set.toList set))) | (cat,set) <- IntMap.toList (productions cnc)])
, ("functions", JSArray (map ffun2json (Array.elems (cncfuns cnc))))
, ("sequences", JSArray (map seq2json (Array.elems (sequences cnc))))
- , ("startCats", JSON.makeObj $ map cats2json (Map.assocs (cnccats cnc)))
- , ("totalFIds", mkJSInt (totalCats cnc))
+ , ("categories", JSON.makeObj $ map cats2json (Map.assocs (cnccats cnc)))
+ , ("totalfids", mkJSInt (totalCats cnc))
]
cats2json :: (CId, CncCat) -> (String,JSValue)
cats2json (c,CncCat start end _) = (showCId c, ixs)
where
ixs = JSON.makeObj
- [ ("s", mkJSInt start)
- , ("e", mkJSInt end)
+ [ ("start", mkJSInt start)
+ , ("end", mkJSInt end)
]
frule2json :: Production -> JSValue