C
C#2y 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
Becquerel2y 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
Temptica2y ago
oh wauw, I thought it didn't matter that much, thank you very much!
Becquerel
Becquerel2y 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...