读取本地json文件,转出为指定格式json 引用添加Json.Net 引用命名空间 using Newtonsoft.Json //读取自定目录下的json文件StreamReader sr = new StreamReader(@"D:\xxx.json");string json = sr.ReadToEnd();//json文件转为 对象 T 创建的类 字段名 应该和json文件中的保持一致 var data = JsonConvert.DeserializeOb…
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; using System.Text; using Newtonsoft.Json; using com.zjpx.model; using System.Collections; usin…
引用添加Json.Net 引用命名空间 using Newtonsoft.Json //读取自定目录下的json文件 StreamReader sr = new StreamReader(@"D:\xxx.json"); string json = sr.ReadToEnd(); //json文件转为 对象 T 创建的类 字段名 应该和json文件中的保持一致 var data = JsonConvert.DeserializeObject<T>(json);…
using System.Collections; using System.Collections.Generic; using UnityEngine; using LitJson; using System.IO; using UnityEditor; public class Person { public string Name { get; set; } public double HP { get; set; } public int Level { get; set; } pub…