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

Error on array support #550

Open
Paiiimannnoitla opened this issue Feb 3, 2023 · 1 comment
Open

Error on array support #550

Paiiimannnoitla opened this issue Feb 3, 2023 · 1 comment

Comments

@Paiiimannnoitla
Copy link

Paiiimannnoitla commented Feb 3, 2023

When I push an array contains % or Chinese characters, array support would be malfunction
ex:
const db = new JsonDB(new Config('database',true,true,'/'))
const input = func() // input is come from other function
db.push('/中文[]',input)

expected result:{"中文":[input_value]}
actuall result:{"中文[]":input_value}

Any idea is appreciate!!

@Belphemur
Copy link
Owner

Hello,
This is a hard issue to fix because of the regex used to recognize keys for array ...
I tried to update it to work with UTF-8, but couldn't get it to work ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants