【问题标题】:Editing text content for Sampledata.json编辑 Sampledata.json 的文本内容
【发布时间】:2014-09-26 01:55:01
【问题描述】:

我正在使用集线器模板创建 windows phone 8.1 应用程序。在 sampledata.json 页面中,我无法以我想要的方式编辑内容。它只允许我以线性形式书写,但我无法列出列表、标题或在另一行继续新文本。例如:

 { 
  "UniqueId": "Group-1-Item-1",
  "Title": "Tiger Nuts Juice",
  "Subtitle": "Prep Time:1hr30mins",
  "ImagePath": "Tiger Nuts Juice1.png",
  "Description" : "Item Description: Pellentesque porta, mauris quis  neque tortor ac erat.",
    "Content" : "I can only write in a linear form just like this. The moment I press enter I'll get an error"},
  {

这就是我运行应用程序时得到的结果:

在 mscorlib.ni.dll 中出现“System.Exception”类型的异常,但未在用户代码中处理

谁能帮我在控制台上以列表形式显示文本?

【问题讨论】:

    标签: c# development-environment windows-phone-8.1


    【解决方案1】:

    您不能在 JSON 中添加换行符,因为那是无效的 JSON。 如果您想编辑数据并使用您添加的标记查看这些更改,请不要使用 JSON。

    您可以将Content 设为一个新对象,其中包含您想查看的内容的枚举。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-04
      • 2021-08-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-02
      • 1970-01-01
      相关资源
      最近更新 更多