Allon Mureinik has posted comments on this change. Change subject: core: Add support to convert json to Map ......................................................................
Patch Set 3: (2 comments) http://gerrit.ovirt.org/#/c/29022/3/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/JsonHelper.java File backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/JsonHelper.java: Line 33: return mapToJson(input, true); Line 34: } Line 35: Line 36: public static Map<String, Object> jsonToMap(String jsonString) throws JsonParseException, JsonMappingException, Line 37: IOException { > IOException is enough same as in mapToJson Agree Line 38: final ObjectMapper mapper = new ObjectMapper(); Line 39: final MapType type = mapper.getTypeFactory().constructMapType(Map.class, String.class, Object.class); Line 40: final Map<String, Object> data = mapper.readValue(jsonString, type); Line 41: return data; Line 37: IOException { Line 38: final ObjectMapper mapper = new ObjectMapper(); Line 39: final MapType type = mapper.getTypeFactory().constructMapType(Map.class, String.class, Object.class); Line 40: final Map<String, Object> data = mapper.readValue(jsonString, type); Line 41: return data; Why's everything final? Line 42: } -- To view, visit http://gerrit.ovirt.org/29022 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I31a837449de1d350dae7a94a69d5d62552474284 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches