Skip to content

Question about jerry_json_parse() encoding #4160

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
clarkttfu opened this issue Aug 21, 2020 · 2 comments
Closed

Question about jerry_json_parse() encoding #4160

clarkttfu opened this issue Aug 21, 2020 · 2 comments
Labels
api Related to the public API

Comments

@clarkttfu
Copy link

JerryScript revision

Identify the git hash(es) or tag(s) where the issue was observed.
2.4.0 (b828d1c)

Hi there,

Does jerry_json_parse() only accept 'cesu-8' string?
Because emoji chars like '🌝' (<Buffer f0 9f 8c 9d>) might crash the process in my tests.

If only 'cesu-8' is supported, it will be great to add another jerry_json_parse_from_utf8().

Thanks,
Clark

@clarkttfu clarkttfu changed the title question about jerry_json_parse() encoding Question about jerry_json_parse() encoding Aug 21, 2020
@rerobika
Copy link
Member

Hi @clarkttfu!

That's a good catch we are going to fix it soon!

@rerobika rerobika added the api Related to the public API label Aug 26, 2020
@rerobika
Copy link
Member

rerobika commented Dec 6, 2021

After #4186 both UTF8 and CESU8 strings are accepted.

@rerobika rerobika closed this as completed Dec 6, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
api Related to the public API
Projects
None yet
Development

No branches or pull requests

2 participants