lundi 11 mai 2015

Java - JSON and Parent Shells

I'm kind of new to Java and programming some first programs using SWT GUI with Eclipse.

I got a few things I don't understand and will appreciate some explanations, preferably expanded to me the easiest way possible.

Can someone please tell me what is the best way for me to save a String ArrayList of properties after the program is shut down?

I was told to save it to a text file, and use JSON to read and write, but I could not understand how to do it. I need to be able to get this information from the user and save it for future use.

Is JSON the best way for my needs?

For example, I will need to save these information arrays:

folder: D:\Videos
buttonsPerLine: 7
labelLength: 75
menuButtonLength: 60
spaceFromLeft: 20
spaceFromTop: 20
Shows:
    brooklyn nine nine
    community
    the big bang theory
    the blacklist

and these:

linkArray1:
    www.youtube.com/1
    www.youtube.com/2
    www.youtube.com/3
linkArray2:
    www.youtube.com/1
    www.youtube.com/2
    www.youtube.com/3
linkArray3:
    www.youtube.com/1
    www.youtube.com/1

Thank you very much!

Aucun commentaire:

Enregistrer un commentaire