Skip to content

Tag: serialization

How to serialize objects to json?

I have a list of objects which I want to serialize to json. I am using the following code to do this: it works as expected but in this case if there is an exception the whole list of events would be discarded. What I want is to skip any individual event if it fails to serialize. Plus these are

How to save an image using JFileChooser

Background info: I’ve made a program that uploads an image using JFileChooser and have made fill in the space of the JFrame. My Question: I’ve attempted implementing my method on a save button and so far I can pull up the JFileChooser but it will not actually save the image. So how would I go abou…