gpt4 book ai didi

c# - 为什么在我的代码中将 json 值转换为字符串

转载 作者:太空宇宙 更新时间:2023-11-03 17:06:22 24 4
gpt4 key购买 nike

<分区>

我想从 Json 中获取一些值

我从服务器收到了什么:

(如您所见,值不是字符串)

 "HP": {
"BaseValue": 44.0, //float
"Point": 3.0, //float
"UpdateFactor": 1.5 //float
}

从服务器接收到jason后

IEnumerator ReceiveJson()
{
var postScoreURL = Url;
var postHeader = new Dictionary<string, string>();
postHeader.Add("Content-Type", "application/json");
WWW request = new WWW(postScoreURL, null, postHeader);
yield return request;
if (request.error != null)
{
}
else
{
Receive = JSONNode.Parse(request.text);
Debug.Log(Receive);
}
}

为什么我收到字符串值?(但这里我有字符串值!!!)

 "HP": {
"BaseValue": "44.0", //string
"Point": "3.0", //string
"UpdateFactor": "1.5" //string
}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com