1 | static Map jsonDecodeMap(S s) { |
2 | O o = jsonDecode(s); |
3 | if (o instanceof L && empty((L) o)) |
4 | ret new HashMap; |
5 | if (o instanceof Map) |
6 | ret (Map) o; |
7 | else |
8 | throw fail("Not a JSON map: " + s); |
9 | } |
download show line numbers debug dex old transpilations
Travelled to 17 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1001918 |
Snippet name: | jsonDecodeMap |
Eternal ID of this version: | #1001918/1 |
Text MD5: | 238fd49a620daa130d5d44172d39b790 |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-12-28 20:19:13 |
Source code size: | 211 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 781 / 2091 |
Referenced in: | [show references] |