返回的Json数据如下:

[[1400025600,9633460,9667535,2698.09,2734.73,2749,2698.08,25333.3057,11784.9,13548.4,69148900],[1400112000,9667536,9700700,2734.94,2771.01,2790,2731.48,24260.1011,11824.5,12435.6,67093300],[1400198400,9700701,9736706,2771,2789,2816.33,2730,34824.2351,17912.2,16912,96751200],[1400284800,9736707,9752556,2789,2782.03,2800,2775,9279.0273,4603.73,4675.29,25840300]]

使用:dynamic jsonRespot = JsonConvert.DeserializeObject<ExpandoObject>(resposeData); 进行解析时,报如下错误:

Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'System.Dynamic.ExpandoObject' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.

To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.

Path '', line 1, position 1.

解决方法,用如下语句序列化:

JArray jsonObj = (JArray)JsonConvert.DeserializeObject(resposeData);

JsonConvert序列化问题的更多相关文章

  1. (推荐JsonConvert )序列化和反序列化Json

    在Json文本和.Net对象之间转换最快的方法是试用JsonSerializer. JsonSerializer通过将.Net对象属性名称映射到Json属性名称,并为其复制值,将.Net对象转换为其J ...

  2. C#.NET序列化XML、JSON、二进制微软自带DLL与newtonsoft(json.net)

    序列化是将对象转换成另一种格式(XML.json.二进制byte[]) JSON序列化 .NET中有三种常用的JSON序列化的类,分别是: Newtonsoft.Json.JsonConvert类(推 ...

  3. Json和序列化总结

    一.序言 遇到问题,就经常逛园,不知你是否曾有,曾经遇到的问题,或者在园子里看到问题的方案,过一段时间,有可能还会摔跤,哈哈...大神请勿喷,小弟记忆不太好,还过来找资料,如果自己写把问题或某个知识点 ...

  4. C# MVC绑定 List<DapperRow>到bootstrap-table列表

    1.Dapper返回List<dynamic>对象 /// <summary> /// 获取候选人推荐的分页数据 /// </summary> /// <pa ...

  5. 在.NET使用JSON作为数据交换格式

    原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 .作者信息和本声明.否则将追究法律责任.http://zhoufoxcn.blog.51cto.com/792419/517093 我们 ...

  6. 【转】C# 解析JSON方法总结

    http://blog.csdn.net/jjhua/article/details/51438317 主要参考http://blog.csdn.NET/joyhen/article/details/ ...

  7. 在.NET中使用Newtonsoft.Json转换,读取,写入的方法介绍

    全局引用 using Newtonsoft.Json; using Newtonsoft.Json.Converters; //把Json字符串反序列化为对象 目标对象 = JavaScriptCon ...

  8. TFS发布计划发送到钉钉消息群

    由于工作中需要用到钉钉,每天都要和钉钉打交道:上下班打卡.出差请假流程.各种工作讨论组,不一而足,工作已然和钉钉绑在了一起,难怪有广告词: 微信是一个生活方式,钉钉是一个工作方式. 我们是钉钉机器人内 ...

  9. 在.NET使用JSON作为数据交换格式【转】

    http://www.cnblogs.com/zhoufoxcn/archive/2011/03/16/2515611.html 我们知道在.NET中我们有多种对象序列化的方式,如XML方式序列化.B ...

随机推荐

  1. Python之freshman08 Socket

    1. Socket介绍 概念 A network socket is an endpoint of a connection across a computer network. Today, mos ...

  2. ssm裤架搭建异常: Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService' ...

  3. LightOJ - 1197 素数筛

    深夜无事可干啊 #include<bits/stdc++.h> using namespace std; const int maxn = 1e6+11; typedef long lon ...

  4. 马的移动(BFS) 详细注释 一个具有情怀的题目

    题目描述 小明很喜欢下国际象棋,一天,他拿着国际象棋中的"马"时突然想到一个问题: 给定两个棋盘上的方格a和b,马从a跳到b最少需要多少步? 现请你编程解决这个问题. 提示:国际象 ...

  5. SpringBoot 精简笔记

    0. Fundamental a. @SpringBootApplication //启动类 b. pom.xml //Maven基本依赖 <parent> <groupId> ...

  6. Putty之public key ssh认证入门

    1.工作平台 客户端:Win2kEn Sp3,Putty Beta 0.53 服务器:RedHat72,OpenSSH_3.4p1 2.Putty简介 一个免费小巧的Win32平台下的ssh客户端.它 ...

  7. Phyton自定义包导入。

    说明:同一个项目下的自定义包. 项目层次: 1:先建好项目Pybasestudty 2:建Python package,包名:pytestpk,__init__.py是建包时自动产生的文件. 3:在该 ...

  8. HDU4499

    In Chinese Chess, there is one kind of powerful chessmen called Cannon. It can move horizontally or ...

  9. 前端 day 039

    一 .html css js 三大基本语言 定义文档的结构:HTML  修饰文档的样式 : css  行为 : JavaScript HTML 全称 Hyper Text Mackeup Langua ...

  10. nginx-图片资源代理

    location ~ .*\.(gif|jpg|jpeg|png|bmp|mp3)$ { root E:/xx/Uploads/; } 记得放在根目录下面