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

How to create a character array using json-c #767

Closed
vaibhavkale20009 opened this issue May 12, 2022 · 1 comment
Closed

How to create a character array using json-c #767

vaibhavkale20009 opened this issue May 12, 2022 · 1 comment

Comments

@vaibhavkale20009
Copy link

there is no function like json_object_new_character so I am not able to make a array like arr=['a','b','c'] if we can json_object_array_add(json_obj,json_object_new_string) it will create array like arr=["a","b","c"],thanks in advance

@j4yk
Copy link

j4yk commented May 12, 2022

JSON does not have a notion of single characters, it only knows strings and it is non-conformant to use ' to surround strings: https://datatracker.ietf.org/doc/html/rfc7159#:~:text=four%20primitive%20types

@hawicz hawicz closed this as completed May 15, 2022
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

3 participants