Skip to content

BUG - json dump field with unicode -> array of ints (instead of string) #1197

@jossef

Description

@jossef

I'm expecting the following code:

json result;
result["name"] = L"אינעל דינק";
std::cout << result.dump(4) << std::endl;

to output:

{
    "name": "\u05D0\u05D9\u05E0\u05E2\u05DC \u05D3\u05D9\u05E0\u05E7"
}

However, it treats the unicode string as json array, outputs instead:

{
    "name": [
        1488,
        1497,
        1504,
        1506,
        1500,
        32,
        1491,
        1497,
        1504,
        1511,
        0
    ]
}

BTW Thanks for this project. cool stuff happen here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: stalethe issue has not been updated in a while and will be closed automatically soon unless it is updated

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions