I have JSON in a text file, and I read the bytes of the file into an array:
byte[] data = File.ReadAllBytes(filename);
Now, I want to get a string that contains the JSON data that was in the original file, but I only have the data byte array available.
Any help would be appreciated.
Thanks.
What about using File.ReadAllText instead?
Anyway, you can convert a Byte[] to a String using
Encoding.UTF8.GetString(data)