浏览代码

remover NewtonJson

/CloudFunction
siyao 3 年前
当前提交
46f9642c
共有 6 个文件被更改,包括 3 次插入1041 次删除
  1. 1
      Assets/HuaweiService/Editor/cloud_db/ClassTemplate.cs
  2. 1
      Assets/HuaweiService/Editor/cloud_db/CloudDBSetting.cs
  3. 3
      Assets/HuaweiService/Editor/cloud_db/GenCode.cs
  4. 5
      Assets/HuaweiService/cloud_function/Utils.cs
  5. 1001
      Assets/HuaweiService/cloud_function/Newtonsoft.Json.dll
  6. 33
      Assets/HuaweiService/cloud_function/Newtonsoft.Json.dll.meta

1
Assets/HuaweiService/Editor/cloud_db/ClassTemplate.cs


using System;
using Newtonsoft.Json;
using UnityEngine;
namespace HuaweiService.CloudDB.Editor {

1
Assets/HuaweiService/Editor/cloud_db/CloudDBSetting.cs


using System;
using Newtonsoft.Json;
using UnityEditor;
using UnityEngine;

3
Assets/HuaweiService/Editor/cloud_db/GenCode.cs


using System.IO;
using Newtonsoft.Json;
using UnityEngine;
namespace HuaweiService.CloudDB.Editor {

Directory.CreateDirectory (ExportFileDir);
using (StreamReader r = new StreamReader (ObjectTypeFilePath)) {
string json = r.ReadToEnd ();
template = JsonConvert.DeserializeObject<ClassTemplate> (json);
template = JsonUtility.FromJson<ClassTemplate> (json);
GenerateObjectTypeInfoHelper ();
foreach (ObjectType objectType in template.objectTypes) {
GenerateModels (objectType);

5
Assets/HuaweiService/cloud_function/Utils.cs


using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using UnityEngine;
namespace HuaweiService.CloudFunction {

}
public static T FromJson<T> (string json) {
T m = JsonConvert.DeserializeObject<T> (json);
T m = JsonUtility.FromJson<T>(json);
return m;
}
}

public JsonModel () { }
public JsonModel (object obj) {
ClassName = obj.GetType ().Name.ToLower ();
ClassValue = JsonConvert.SerializeObject (obj);
ClassValue = JsonUtility.ToJson(obj);
}
}

1001
Assets/HuaweiService/cloud_function/Newtonsoft.Json.dll
文件差异内容过多而无法显示
查看文件

33
Assets/HuaweiService/cloud_function/Newtonsoft.Json.dll.meta


fileFormatVersion: 2
guid: a80efc5e8faf849ac871faebb4080ea4
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存