I've got the bytes from the nbt data in the inv_armor property. But how do I convert this into a json object or array of bytes that represents a json format in c#. Please help!
byte[] buffer = Convert.FromBase64String(value);
byte[] decompressed;
using (var inputStream = new MemoryStream(buffer))
{
using var outputStream = new MemoryStream();
using (var gzip = new GZipStream(inputStream, CompressionMode.Decompress, leaveOpen: true))
{
gzip.CopyTo(outputStream);
}
decompressed = outputStream.ToArray();
byte[] json = new byte[];//Convert from nbt bytes to json bytes...
JsonConvert.DeserializeObject<T>(Encoding.UTF8.GetString(json));
}
Hello,
I've got the bytes from the nbt data in the inv_armor property. But how do I convert this into a json object or array of bytes that represents a json format in c#. Please help!