Giter VIP home page Giter VIP logo

Comments (2)

TommyLemon avatar TommyLemon commented on May 3, 2024

1.小写的认为是普通对象,例如

{
    "data": {
        "User": {
            "id": 82001
        }
    }
}

返回

{
    "data": {
        "User": {
            "id": 82001,
            "sex": 0,
            "name": "测试账号",
            "tag": "Dev",
            "head": "https://gss2.bdstatic.com/-fo3dSag_xI4khGkpoWK1HF6hhy/baike/c0%3Dbaike92%2C5%2C5%2C92%2C30/sign=c31ae7219525bc313f5009ca3fb6e6d4/42a98226cffc1e17646dbede4690f603728de90b.jpg",
            "contactIdList": [
                82003,
                93793,
                82005
            ],
            "pictureList": [
                "http://common.cnblogs.com/images/icon_weibo_24.png"
            ],
            "date": "2017-02-01 19:21:50.0"
        }
    },
    "code": 200,
    "msg": "success"
}

2.的确是一个bug,后续解决

from apijson.

TommyLemon avatar TommyLemon commented on May 3, 2024

这个是由于 Parser 在解析到第 0 个对象时,如果 object == null || object.isEmpty 则会认为下面的对象也无意义。
应该改为只有当第 0 个对象时表对象时才应该忽略下面对象的解析。
不过目前从使用来看,传普通对象的意义不大,多套了一层没啥好处,封装和解析都麻烦;
但如果是表对象,确实还得兼容下这种情况,

from apijson.

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.