Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #1001918 - jsonDecodeMap

JavaX fragment (include)

static Map jsonDecodeMap(S s) {
  O o = jsonDecode(s);
  if (o instanceof L && empty((L) o))
    ret new HashMap;
  if (o instanceof Map)
    ret (Map) o;
  else
    throw fail("Not a JSON map: " + s);
}

download  show line numbers  debug dex   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, 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: 471 / 1656
Referenced in: [show references]

Formerly at http://tinybrain.de/1001918 & http://1001918.tinybrain.de