You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I do Add Transform on JSON file that is UTF-8 encoding, it creates environment files that are UTF-8-BOM encoding.
UTF-8-BOM encoding on JSON files is not supported for many application.
When looking at the preview we see also the message: These files have different encodings. Left file: Unicode (UTF-8) without signature. Right file: Unicode (UTF-8) with signature.
After building the project when trying to work with the transformed file with Unicode (UTF-8) with signature.
The error we receive: System.Runtime.Serialization.SerializationException: 'There was an error deserializing. Encountered unexpected character 'ï'.' (Because none supported encodig).
In the JSON spec it says JSON requires UTF-8 support by decoders.
Error thrown by System.Runtime.Serialization.Json, Version=6.0.0.0
var jsonSettings = new DataContractJsonSerializerSettings() { UseSimpleDictionaryFormat = true };
jsonSerializer.ReadObject(filestream)
Thanks for the support or workaround!
The text was updated successfully, but these errors were encountered:
Marangal
changed the title
on json file add transform creates utf-8-BOM encoding files while source file is utf-8 (utf-8-bom not supported)
JSON file add transform creates UTF-8-BOM encoding files while source file is UTF-8. This UTF-8-BOM is not supported by most decoders.
Jun 14, 2022
My current solution to this issue is by reading the json file first and put it in memory stream instead of file stream and using that memory stream for the jsonSerializer.ReadObject(ms)
Hi
When I do Add Transform on JSON file that is UTF-8 encoding, it creates environment files that are UTF-8-BOM encoding.
UTF-8-BOM encoding on JSON files is not supported for many application.
When looking at the preview we see also the message: These files have different encodings. Left file: Unicode (UTF-8) without signature. Right file: Unicode (UTF-8) with signature.
After building the project when trying to work with the transformed file with Unicode (UTF-8) with signature.
The error we receive: System.Runtime.Serialization.SerializationException: 'There was an error deserializing. Encountered unexpected character 'ï'.' (Because none supported encodig).
In the JSON spec it says JSON requires UTF-8 support by decoders.
Error thrown by System.Runtime.Serialization.Json, Version=6.0.0.0
var jsonSettings = new DataContractJsonSerializerSettings() { UseSimpleDictionaryFormat = true };
jsonSerializer.ReadObject(filestream)
Thanks for the support or workaround!
The text was updated successfully, but these errors were encountered: