3 ms·
This also won't work since it'll crash on missing fields. e.get("commit", {}).get("author", "") maybe (ignoring the corner case of non-list top level object).
by taway1237 3y ago
This also won't work since it'll crash on missing fields. e.get("commit", {}).get("author", "") maybe (ignoring the corner case of non-list top level object).
- Perepiska 3y agoWhich is pretty useful - I will get malformed JSON error as earlier as possible. P.S. `some.get("A", {})["B"]` is bad programming habit because there might be a list on `some["A"]`