Skip to content

qs.stringify(json) and qs.parse(json) Results are inconsistent with expectations #471

@codeleep

Description

@codeleep

When my json is like this

[
    {
        "fansUid": "",
        "masterShopId": 0,
        "items": [
            {
                "itemId": "",
                "skus": [
                    {
                        "price": 0,
                        "skuId": 0,
                        "promotionToolCode": ""
                    }
                ]
            }
        ],
        "scene": ""
    }
]

i use qs.stringify(json) and qs.parse(json) . but result is

[
    {
        "fansUid": "",
        "masterShopId": "0",
        "items": [
            {
                "itemId": "",
                "skus": [
                    {
                        "[price]": "0",
                        "[skuId]": "0",
                        "[promotionToolCode]": ""
                    }
                ]
            }
        ],
        "scene": ""
    }
]

It was obvious that this was a mistake. How should I solve it

I tried to change multiple versions as well, but the latest version still did not fix the problem.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions