@Override public EDITOR demarshall(CONTEXT context, JsonPath jsonPath) { EDITOR editor = context.createEditor(); editor.setId(jsonPath.getString("id")); editor.setPlatform(jsonPath.getString("platform")); editor.setEnabled(jsonPath.getBoolean("enabled")); editor.setOperatingSystem(jsonPath.getString("operatingSystem")); editor.setOsVersion(jsonPath.getString("osVersion")); editor.setAlias(jsonPath.getString("alias")); editor.setDeviceType(jsonPath.getString("deviceType")); editor.setDeviceToken(jsonPath.getString("deviceToken")); editor.setSimplePushEndpoint(jsonPath.getString("simplePushEndpoint")); HashSet<String> categories = new HashSet<String>(); List<String> jsonCategories = jsonPath.getList("categories"); if (jsonCategories != null) { for (String jsonCategory : jsonCategories) { categories.add(jsonCategory); } } editor.setCategories(categories); return editor; }