My goal is to be able to fetch values from a JsonObject using a key, such as example.path.to.string
.
If you used this key, you should be able to fetch the string
value from this:
{
"example": {
"path": {
"to": {
"string": "Hello world!"
}
}
}
}
Ideally, I would be able to use something like example.getAsJsonObject().get("example.path.to.string").getAsString();
to get this value.
However, I have had no luck with it.
I have also seen this question, but it has no explanation and is hard to understand.
How would I go about this?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…