I have a template as "{\"lock\":string}".
I want to create a json like {"lock":null} not {"lock":"null"}.
How i do bu using Json_setValue()?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I have a template as "{\"lock\":string}".
I want to create a json like {"lock":null} not {"lock":"null"}.
How i do bu using Json_setValue()?
Hi frank lin1,
Which version of the CC32XX SDK are you using?
Steve
OK, I think I understand your issue. You're trying to call Json_setValue() to set the value of lock to null, but it's setting it to "null" (with the quotes). Is that right?
Can you share the code of your Json_setValue() call?
Steve
Hi,
I found the problem.
I am using Json_setValue(objectHandle, "\"lock\"", "null", sizeof("null"));
But it must us as Json_setValue(objectHandle, "\"lock\"", NULL, 0));