Comments (1)
提示错误的主要原因是json字符串里有个'{}',这虽然是合法的,但在原本的逻辑里会导致解析错误。现在我调整成把'{}'直接当做object类型来处理,应该能够解决这个问题。
不过现实情况下我觉得正常api返回的数据应该不会出现'{}'这种情况,因为这就代表序列化的是一个‘没有任何成员属性的对象’,结果来说毫无意义。
另外你的这个例子还让我发现了上个版本处理空数组问题没解决的一个问题,就是连续多个空数组会导致后面的后面的泛型会错误地传递到前面泛型的嵌套中,这次修改也一并修掉了。
如果方便的话可以下载源码再跑跑看,确定没问题的话我就打包发新版本了
@sintak
from jsonformat4flutter.
Related Issues (20)
- 为什么不考虑开发一个强力而又迅速的idea插件呢? HOT 1
- 你好发现一个问题 在解析数组的时候会出点小问题 HOT 2
- 你好 在解析过程中 如果没有对应起来取数组数据循环时会报错 可以加个非空判断吗? HOT 19
- 支持Map类型 HOT 9
- 获取不到解析内容 HOT 2
- 有结合dio使用的例子吗 HOT 2
- Mac OS 10.14.2 上文本都是白色问题 HOT 1
- 大佬能否支持 下面2个功能1.支持字段驼峰 2.解析List的时候是否可以读取多个元素(默认是第一个,可能第一个数据字段不全) HOT 3
- tostring的问题,建议
- mac 使用问题 HOT 1
- mac下载的文件怎么使用? HOT 3
- 无法生成Bean HOT 2
- exe二次生成bean卡死崩溃
- ,
- 工厂方法中 jsonStr is String ?:
- 0.7mac版不会生成代码 HOT 1
- json本身的顶层级不是对象而是数组,解析报错 HOT 4
- 0.8无linux版本下载 HOT 1
- dart 2.9 打开空安全后全错了,有计划兼容嘛? HOT 3
- macos下生成不成功
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonformat4flutter.