static Map<String, String> parseJsonObject(String s) { List<String> tok = JsonTok.split(s); new (Tree)Map<String, String> map; for (int i = 1; i+4 < tok.size(); i += 2) { if (tok.get(i+2).equals(":")) map.put(unquote(tok.get(i)), unquote(tok.get(i+4))); } return map; }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1000533 |
Snippet name: | Super-simple JSON object parser using JsonTok |
Eternal ID of this version: | #1000533/1 |
Text MD5: | af75118a02ff4990c5ab8b418fc6dec1 |
Author: | stefan |
Category: | |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-08-11 00:27:49 |
Source code size: | 297 bytes / 9 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 590 / 523 |
Referenced in: | #3000382 - Answer for ferdie (>> t = 1, f = 0) #3000383 - Answer for funkoverflow (>> t=1, f=0 okay) |