#Read json
21 messages · Page 1 of 1 (latest)
where is the json coming from?
data folder
but since what I get from there is an InputStream I guess that does not matter
well in that case just use gson
yeah but I just can't find the method for it
The only thing I've found is the JsonReader object, but that then requires me to check every key
no a InputStreamReader
where's that method?
something tells me this does not work if the class fields are not primitive types
no? gson can desialize most things
even Json Text and BlockPos objects?
I'll go for CODEC
what's the equivalent of Text.CODEC? It looks like it does not exist
See TextCodecs
Even having created a CODEC I need to parse the file into a JsonElement.
Again, this is the difficult part, pls help
Use JsonParser