Hi Guys,
I am using YAJL_OBJECT_FIND(DocNode: 'String'); to find a node inside a JSON.
If the node is not present then it will return SPP:NULL else an address of the node. My doubt here is - is there a way to validate whether Node is found or not? .
Clarification on - YAJL_OBJECT_FIND
Re: Clarification on - YAJL_OBJECT_FIND
Unless I misunderstand you, you have answered your own question.
YAJL_OBJECT_FIND returns a pointer so one way to test is simply:
YAJL_OBJECT_FIND returns a pointer so one way to test is simply:
Code: Select all
node = YAJL_OBJECT_FIND(.....);
if node <> *Null;
// node is valid
else;
// node not found
endif;
-
- Posts: 7
- Joined: Sat Jul 01, 2023 3:57 pm
Re: Clarification on - YAJL_OBJECT_FIND
Thanks Jon.