Java 8 Stream API Common Operations

foreach list.forEach(System.out::println); map List<Integer> numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5); List<Integer> squaresList = numbers.stream().map( i -> i*i).distinct().collect(Collectors.toList()); filter List<String>strings = Arrays.asList("abc", "", "bc", "efg", "abcd","", "jkl"); // count empty strings long count = strings.stream().filter(string -> string.isEmpty()).count(); List<UserInfo> Read more

Jackson vs Gson

1. Introduction In this article, we’ll compare the Gson and Jackson APIs for serializing and deserializing JSON data to Java objects and vice-versa. Gson and Jackson are complete libraries offering JSON data-binding support for Java. Each are actively developed open-source projects which offer to Read more