Reading a json object from a file or writing a json object in a file is always a task that you have to do it.
Because I was always in the situation to do this, I was thinking to propose here a really simple example. Let’s suppose that we have a file with the following content:
[
{
"name":"Test",
"age":20
},
{
"name":"Test Second",
"age":21
}
]
I have the JSON saved in a file named persons.json and stored in a location on the hard drive.
Now we define a POJO for the JSON above:
```
[Read more...]