1 | static Map<String, String> parseJsonObject(String s) {
|
2 | List<String> tok = JsonTok.split(s); |
3 | new (Tree)Map<String, String> map; |
4 | for (int i = 1; i+4 < tok.size(); i += 2) {
|
5 | if (tok.get(i+2).equals(":"))
|
6 | map.put(unquote(tok.get(i)), unquote(tok.get(i+4))); |
7 | } |
8 | return map; |
9 | } |
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: | 795 / 750 |
| Referenced in: | [show references] |