1
我寫一個JSON在後面的代碼使用DLL稱爲Newtonsoft.Json保存文件的JSON代碼的Windows Phone背後創建
這裏是我的代碼:
StringBuilder stringBuilder = new StringBuilder();
StringWriter stringWriter = new StringWriter(stringBuilder);
JsonWriter jsonWriter = new JsonTextWriter(stringWriter);
jsonWriter.Formatting = Formatting.Indented;
jsonWriter.WriteStartObject();
jsonWriter.WritePropertyName("name");
jsonWriter.WriteRawValue(textboxNomeCompleto.Text);
jsonWriter.WritePropertyName("user");
jsonWriter.WriteValue(textboxEmail.Text);
jsonWriter.WritePropertyName("password");
jsonWriter.WriteValue(textboxSenha.Text);
jsonWriter.WriteEndObject();
如何節省使用沙箱中創建的文件IsolatedStoreFile ???
嘗試存儲jsonWriter的對象在隔離存儲 – Harshit
在這裏看到一個類似的解決方案: http://stackoverflow.com/questions/5980403/wiring-json-using-newtonsoft-json-jsontextwriter – Senthil