This routine calls the user-supplied array_callback_func subroutine
for each element in the array.
Note
For integer, double, logical, and character arrays,
higher-level routines are provided (see json_get), so
this routine does not have to be used for those cases.
Nodes of different colours represent the following:
Module Graph
Solid arrows point from a parent (sub)module to the submodule which is
descended from it. Dashed arrows point from a module being used to the
module using it.
Type Graph
Solid arrows point from one derived type to another which extends
(inherits from) it. Dashed arrows point from a derived type to another
type containing it as a components, with a label listing the name(s) of
said component(s).
Call Graph
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Module Graph
Solid arrows point from a parent (sub)module to the submodule which is
descended from it. Dashed arrows point from a module being used to the
module using it.
Type Graph
Solid arrows point from one derived type to another which extends
(inherits from) it. Dashed arrows point from a derived type to another
type containing it as a components, with a label listing the name(s) of
said component(s).
Call Graph
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
subroutine json_get_array(me,array_callback)implicit none type(json_value),pointer,intent(in)::meprocedure(array_callback_func)::array_callbacktype(json_value),pointer::elementinteger(IK)::i,countif(exception_thrown)return nullify(element)select case(me%var_type)case(json_array)count=json_count(me)element=>me%childrendo i=1,count! callback for each childcall array_callback(element,i,count)element=>element%nextend do case defaultcall throw_exception('Error in json_get_array:'//&' Resolved value is not an array ')end select!cleanup:if(associated(element))nullify(element)end subroutine json_get_array