Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.
This repository was archived by the owner on Jul 17, 2025. It is now read-only.

cjson & dkjson incorrectly parse saved json if the key only consists of numbers. #42

@HotaruBlaze

Description

@HotaruBlaze

If a key only consists of numbers, such as if a players name is "12345", when loading the json into lua, it will be parsed as a number, instead of a string, this can cause issues due to scripts using below, expecting it to be the string they saved, not being a number.

exampleTable[tostring("12345")] = true

This will break when you restart the server, as the libs will parse this as a number and not a string.

we may want to add a form of handler for this or look into a way to fix this.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions