More json cleanup

This commit is contained in:
ronreg-ribdev 2020-06-05 03:35:12 -07:00
parent 0293b9c6ee
commit c718c49ceb

View File

@ -183,10 +183,8 @@
=, format =, format
=/ handler |= jon=json =/ handler |= jon=json
=/ root=json ((ot:dejs ~[['root' same]]) jon) =/ root=json ((ot:dejs ~[['root' same]]) jon)
=/ bsa=json ((ot:dejs ~[['bsa' same]]) root) =/ bsa=(list json) ((ot:dejs ~[['bsa' (ar:dejs same)]]) root)
?> ?=(%a -.bsa) (pairs:enjs [[%elevators %a bsa] ~])
~& -.bsa
(pairs:enjs [[%elevators %a p.bsa] ~])
(with-json-handler response handler) (with-json-handler response handler)
:: ::
++ bart-api-routeplan ++ bart-api-routeplan
@ -207,7 +205,8 @@
=/ handler =/ handler
|= jon=json |= jon=json
=/ root=json ((ot:dejs [['root' same] ~]) jon) =/ root=json ((ot:dejs [['root' same] ~]) jon)
root =/ schedule=json ((ot:dejs [['schedule' same] ~]) root)
(pairs:enjs ~[[%routes schedule]])
(with-json-handler response handler) (with-json-handler response handler)
++ poke-handle-json ++ poke-handle-json
|= jon=json |= jon=json