Problem with gson.fromJson()
Archived 2 years ago
S
Splayfer
Hello together,
i just want to read a json object from a .json file using gson.fromJson(reader, Type.class) but it doesnt work :(
```java
public void doSomething() throws IOException {
Gson gson = new Gson();
BrawlPlayer[] array = gson.fromJson(new FileReader("PATH"), BrawlPlayer[].class);
}
```
The return value for the fromJson() function is always null. I'm getting no errors even with try catch and writing values works just fine but reading doesnt
