jackson json code example
Example 1: jackson object to json
ObjectMapper objectMapper = new ObjectMapper();
Car car = new Car("yellow", "renault");
objectMapper.writeValueAsString(car);
Example 2: jackson object to json
val objectMapper = ObjectMapper()
val car = Car("yellow", "renault")
objectMapper.writeValueAsString(car)