I want to get some ideas to handle a JSON structure like this. Especially for the '/' key.
{
"tree":{
"/":"1234567890"
},
"parents":null
}
I created this (works if I replace / with slash in the given JSON)
private class Test {
private SubDirectory tree;
private String parents;
}
private class SubDirectory {
private String slash;
// private String /; obviously not working :D
}
using Gson with a InputStreamReader and then:
Test p = gson.fromJson(reader, Test.class);
So my first idea is to check reader
and replace that / to slash.
But really ?! ...