需要帮助使用Json对象 [英] Need help working with Json object

查看:49
本文介绍了需要帮助使用Json对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我输入此网址www.google.com/finance/info?q=NSE%3ARELIANCE时,我会收到Json值[{id:4674509,t:RELIANCE,e: NSE,l:910.40,l_fix:910.40,l_cur:Rs.910.40,s:0,ltt:格林尼治标准时间3:55 + 5:30 ,:6月5日下午3:55 GMT + 5:30,lt_dts:2015-06-05T15:55:37Z,c: - 2.30,c_fix: -2.30,cp: - 0.25,cp_fix: - 0.25,ccol:chr,pcls_fix:912.7}]





但是当我收到来自c#Windows窗体的回复



\ n //

[\ n

{\ n \id \:\4674509 \\ n,

\t \ :\RELIANCE \\ n,

\e \:\NSE \\ n,

\ l\:\910.40 \\ n,

\l_fix \:\910.40 \\ n,

\l_cur \:\Rs.910.40 \\ n,

\s \:\0 \\ n,

\ltt\:\\ 格林威治标准时间下午3:55 + 5:30\\\\ n \\ n \\ n \\ n \\ n \\ n \\ n \\ n \\ n \\ n \\ n \\ n \\ n \\ n \\ n: \\ n,

\lt_dts \:\2015-06-05T15:55:37Z \\ n,

\c \:\-2.30 \\ n,

\c_fix \:\-2.30 \\ n,

\cp \:\ - 0.25 \\ n,

\cp_fix \:\ - 0.25 \\ n,

\ccol \:\chr \\ n,

\pcls_fix \:\912.7 \ \ n

} \ n] \ n





为什么会带这个\\ 我该怎么做。

请帮助

When i type this URL www.google.com/finance/info?q=NSE%3ARELIANCE i get Json value [ { "id": "4674509" ,"t" : "RELIANCE" ,"e" : "NSE" ,"l" : "910.40" ,"l_fix" : "910.40" ,"l_cur" : "Rs.910.40" ,"s": "0" ,"ltt":"3:55PM GMT+5:30" ,"lt" : "Jun 5, 3:55PM GMT+5:30" ,"lt_dts" : "2015-06-05T15:55:37Z" ,"c" : "-2.30" ,"c_fix" : "-2.30" ,"cp" : "-0.25" ,"cp_fix" : "-0.25" ,"ccol" : "chr" ,"pcls_fix" : "912.7" } ]


But When i get response from c# Windows Forms

\n//
[\n
{\n\"id\": \"4674509\"\n,
\"t\" : \"RELIANCE\"\n,
\"e\" : \"NSE\"\n,
\"l\" : \"910.40\"\n,
\"l_fix\" : \"910.40\"\n,
\"l_cur\" : \"Rs.910.40\"\n,
\"s\": \"0\"\n,
\"ltt\":\"3:55PM GMT+5:30\"\n,
\"lt\" : \"Jun 5, 3:55PM GMT+5:30\"\n,
\"lt_dts\" : \"2015-06-05T15:55:37Z\"\n,
\"c\" : \"-2.30\"\n,
\"c_fix\" : \"-2.30\"\n,
\"cp\" : \"-0.25\"\n,
\"cp_fix\" : \"-0.25\"\n,
\"ccol\" : \"chr\"\n,
\"pcls_fix\" : \"912.7\"\n
}\n]\n"


Why is this with "\" and what can i do.?
Please help

推荐答案

这只是查看器中字符串的c#表示,实际的字符串没有分隔符或换行符,除非你自己对返回的json做了些什么。
That is just the c# representation of a string in the viewer, the actual string does not have deliminators or line feeds unless you are doing something to the return json yourself.


这篇关于需要帮助使用Json对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆