Returns pointer to the first child of the object
(or null()
if it is not associated).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | p | object or array JSON data |
|
type(json_value), | pointer | :: | child | pointer to the child |
subroutine json_value_get_child(json, p, child)
implicit none
class(json_core),intent(inout) :: json
type(json_value),pointer,intent(in) :: p !! object or array JSON data
type(json_value),pointer :: child !! pointer to the child
if (associated(p)) then
child => p%children
else
nullify(child)
call json%throw_exception('Error in json_value_get_child: '//&
'pointer is not associated.')
end if
end subroutine json_value_get_child