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

json_object_get_string gives segmentation error #317

Closed
tikluganguly opened this issue Apr 25, 2017 · 2 comments
Closed

json_object_get_string gives segmentation error #317

tikluganguly opened this issue Apr 25, 2017 · 2 comments

Comments

@tikluganguly
Copy link

tikluganguly commented Apr 25, 2017

Hi All,

I am trying to parse a json object using json-c. the output of json_tokener_parse_verbose is coming as "success". The type from json_object_get_type coming as "json_type_string". Also, I can see the length of string by using "json_object_get_string_len". I can even see the string object by calling "json_object_to_json_string". But if I am calling "json_object_get_string" to get the actual string. I am getting a segmentation error. I am using version "1.6" cross compiled for embedded powerpc running linux. Any idea why the error is coming?

Regards
Tiklu

@hawicz
Copy link
Member

hawicz commented Apr 29, 2017

1.6? There is no such version of json-c. The most recent (though old) release is 0.12.

Without more information, such as the line of code where it's crashing, or a full stack trace, it's nearly impossible to suggest what's going wrong.

@tikluganguly
Copy link
Author

Hi Guys,
Sorry, I was actually using json-c with azure c sdk. Azure c sdk have parson built into it. Both parson and json-c have "json_object_get_string" function. Now as I was doing a dynamic linking for json-c and static linking on azure sdk. During runtime the function was crashing. The issue is now solved.

Thanks
Tiklu

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