Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]多维数组转换错误 #14

Open
lhlyu opened this issue Sep 27, 2021 · 0 comments
Open

[BUG]多维数组转换错误 #14

lhlyu opened this issue Sep 27, 2021 · 0 comments
Labels
bug 漏洞

Comments

@lhlyu
Copy link
Member

lhlyu commented Sep 27, 2021

Original Data

{
    "a": 123,
    "b": "xxx",
    "c": [
        [
            1,
            2,
            3
        ],
        [
            1,
            null,
            3
        ]
    ]
}

Result

type RootObject struct {
    A int           `json:"a"`
    B string        `json:"b"`
    C []interface{} `json:"c"`
}

Expect

type RootObject struct {
    A int           `json:"a"`
    B string        `json:"b"`
    C [][]interface{} `json:"c"`
}
@lhlyu lhlyu added the bug 漏洞 label Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 漏洞
Projects
None yet
Development

No branches or pull requests

1 participant