Code Monkey home page Code Monkey logo

Comments (1)

debuggerx01 avatar debuggerx01 commented on September 20, 2024

提示错误的主要原因是json字符串里有个'{}',这虽然是合法的,但在原本的逻辑里会导致解析错误。现在我调整成把'{}'直接当做object类型来处理,应该能够解决这个问题。
不过现实情况下我觉得正常api返回的数据应该不会出现'{}'这种情况,因为这就代表序列化的是一个‘没有任何成员属性的对象’,结果来说毫无意义。
另外你的这个例子还让我发现了上个版本处理空数组问题没解决的一个问题,就是连续多个空数组会导致后面的后面的泛型会错误地传递到前面泛型的嵌套中,这次修改也一并修掉了。
如果方便的话可以下载源码再跑跑看,确定没问题的话我就打包发新版本了
@sintak

from jsonformat4flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.