C
C#3y ago
Temptica

Json Parsing cuts of my string after serialising my object

After parsing my object with a lot of coordinates, it somehow only writes 90113 characters.
3 Replies
Becquerel
Becquerel3y ago
a quick google suggests you may need to add a using statement for the streamwriter e.g.using var streamWriter = new... alternatively try setting Autoflush on the streamwriter object to true
Temptica
TempticaOP3y ago
oh wauw, I thought it didn't matter that much, thank you very much!
Becquerel
Becquerel3y ago
in general it's a good idea to always using something that implements IDisposable obviously you won't know what implements IDisposable at first but you get a feel for it :) streams, files, sockets...
Want results from more Discord servers?
Add your server