Skip to content

[PLATFORM]: keyorder (json) has a significant bug #481

@Leonid-Ganin

Description

@Leonid-Ganin

Describe the bug
If we have a table {k1 = 123, k2 = false, k3 = false, k4 = '456'} and we use json.encode with keyorder = {'k2', 'k1', 'k3', 'k4'}, then this will not return the proper value. I looked into the json sources and realized what the problem is, where the keyorder is being checked (if v then), and it should go (if v ~= nil) so that the false value also passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions