Json Serialization doubled when using Setting Storage Template / FileService Bug? #4703
Open
1 of 3 tasks
Labels
bug
The issue relates to the wizard not working or a problem with the generated code.
Describe the bug
When using the Setting Storage Template the Setting-Object is serialized twice.
At LocalSettingsService.cs the method Json.StringifyAsync(value) is called which serializes the object and after that in the FileService-Method .Save the setting will be serialized again. I think the Json-serialization in FileService is wrong, because it makes the FileService useless for other text file IO cases (see line var fileContent = JsonConvert.SerializeObject(content, Formatting.Indented);).
Of course same with deserialization.
And maybe it would be better to use JsonConvert.SerializeObject(content, Formatting.Indented); instead of JsonConvert.SerializeObject(content).
Greetings Martin
To Reproduce
Additional context
No response
Applies to the following platforms:
About your setup
The text was updated successfully, but these errors were encountered: