cmJson.h/c : Added cmJsonMemberAtIndex().
This commit is contained in:
parent
a607108e48
commit
6331cb1753
8
cmJson.c
8
cmJson.c
@ -1456,6 +1456,14 @@ cmJsRC_t cmJsonMemberType( const cmJsonNode_t* np, const char* label, unsig
|
||||
return rc;
|
||||
}
|
||||
|
||||
cmJsonNode_t* cmJsonMemberAtIndex( cmJsonNode_t* objNodePtr, unsigned idx )
|
||||
{
|
||||
cmJsonNode_t* cnp = cmJsonArrayElement( objNodePtr, idx );
|
||||
assert( cmJsonIsPair(cnp) );
|
||||
return cnp;
|
||||
}
|
||||
|
||||
|
||||
cmJsRC_t cmJsonUIntMember( const cmJsonNode_t* np, const char* label, unsigned* retPtr )
|
||||
{
|
||||
cmJsonNode_t* vp;
|
||||
|
3
cmJson.h
3
cmJson.h
@ -198,6 +198,9 @@ extern "C" {
|
||||
// Return the type of a member value.
|
||||
cmJsRC_t cmJsonMemberType( const cmJsonNode_t* objectNodePtr, const char* label, unsigned* typeIdRef );
|
||||
|
||||
// Return the pair at the specified index. Use cmJsonChildCount() to get the count of pairs in the object.
|
||||
cmJsonNode_t* cmJsonMemberAtIndex( cmJsonNode_t* objNodePtr, unsigned idx );
|
||||
|
||||
// Return values associated with the member values in the object
|
||||
// pointed to by object objectNodePtr.
|
||||
cmJsRC_t cmJsonUIntMember( const cmJsonNode_t* objectNodePtr, const char* label, unsigned* retPtr );
|
||||
|
Loading…
Reference in New Issue
Block a user