@@ -9553,33 +9553,25 @@ recursive subroutine json_traverse(json,p,traverse_callback)
9553
9553
type (json_value),pointer :: element ! ! a child element
9554
9554
integer (IK) :: i ! ! counter
9555
9555
integer (IK) :: icount ! ! number of children
9556
-
9557
9556
logical (LK) :: finished ! ! can be used to stop the process
9558
9557
9559
- if (json% exception_thrown) return
9560
-
9561
- ! ! recursive [[json_value]] traversal.
9562
-
9563
9558
if (json% exception_thrown) return
9564
9559
call traverse_callback(json,p,finished) ! first call for this object
9565
9560
if (finished) return
9566
9561
9567
9562
! for arrays and objects, have to also call for all children:
9568
9563
if (p% var_type== json_array .or. p% var_type== json_object) then
9569
9564
9570
- print * , loc(p), associated (p)
9571
9565
icount = json% count (p) ! number of children
9572
- print * , icount
9573
9566
if (icount> 0 ) then
9574
- print * , icount, " >0"
9575
9567
element = > p% children ! first one
9576
9568
do i = 1 , icount ! call for each child
9577
9569
if (.not. associated (element)) then
9578
9570
call json% throw_exception(' Error in json_traverse: ' // &
9579
9571
' Malformed JSON linked list' )
9580
9572
return
9581
9573
end if
9582
- call json% traverse(element, traverse_callback)
9574
+ call json% traverse(element, traverse_callback) ! this is json_traverse
9583
9575
if (finished .or. json% exception_thrown) exit
9584
9576
element = > element% next
9585
9577
end do
0 commit comments