Store Hardcoded JSON string to variable

后端 未结 4 961
情书的邮戳
情书的邮戳 2021-02-05 01:48

I\'m having an issue storing this json string to a variable. It\'s gotta be something stupid I am missing here

private string someJson = @\"{
    \"ErrorMessage         


        
4条回答
  •  借酒劲吻你
    2021-02-05 02:46

    Simple Approach is to copy the JSON to a .json file and read that file in the code

    string jsonData = string.Empty;
    jsonData = File.ReadAllText(@"\UISettings.json");
    

提交回复
热议问题