1 | static L<Map> findAllMaps(O json) { |
2 | new L<Map> l; |
3 | findAllMaps_impl(json, l); |
4 | ret l; |
5 | } |
6 | |
7 | static void findAllMaps_impl(O json, L l) { |
8 | if (json instanceof L) |
9 | for (O x : (L) json) |
10 | findAllMaps_impl(x, l); |
11 | else if (json instanceof Map) { |
12 | l.add((Map) json); |
13 | for (O x : values((Map) json)) |
14 | findAllMaps_impl(x, l); |
15 | } |
16 | } |
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: | #1003289 |
Snippet name: | findAllMaps - scan JSON structure for maps |
Eternal ID of this version: | #1003289/1 |
Text MD5: | 5599d0db307af20cbb5c1bd27f50b715 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-06-17 18:02:29 |
Source code size: | 359 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 661 / 660 |
Referenced in: | [show references] |