Tag Archives: Json

Return json string with proper name

In C# 7, it is now possible to have tuple return type. You would have to use a var to store the return value. However if you simply return the var as a json, the json will be slightly messed … Continue reading

Posted in C#, Json | Tagged , | Leave a comment

Additional text encountered after finished reading JSON content:

When parsing through json you may encounter the error “Additional text encountered after finished reading JSON content:”. This is usually due to incorrect json syntax. One such example that result in the above error would be {“StaffID”:”S01″,”StaffRank”:”Manager”},{“StaffID”:”S02″,”StaffRank”:”Waiter”} Surrounding the above … Continue reading

Posted in C#, Json | Tagged , , | Leave a comment

Unexpected character encountered while parsing value: <. Path ”, line 0, position 0.

You may encounter “Unexpected character encountered while parsing value: <. Path '', line 0, position 0." when trying to parse Json result that are downloaded from the WebClient method if the data is compressed in GZip. This is because WebClient … Continue reading

Posted in C#, Json, Windows Phone | Tagged , , , , , , , , | Leave a comment