Can I have JSON serialize properties (I mean Java bean getter and setter properties) of POJOs?
Yes. The Jackson and Jersey projects will be able to help you there. Here is an article about serializing a Java object using Jackson. Essentially, you can do
new JavaTypeMapper().writeValue(new File("out.json"), myObject);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With