How does Jackson serialize a POJO to JSON format though POJOs do not explicitly implement Serializable interface in spring rest?