Skip to content

Commit f33d2b0

Browse files
committedMay 19, 2024·
removed debug prints and some cleanup
1 parent a6acfce commit f33d2b0

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed
 

Diff for: ‎src/json_value_module.F90

+1-9
Original file line numberDiff line numberDiff line change
@@ -9553,33 +9553,25 @@ recursive subroutine json_traverse(json,p,traverse_callback)
95539553
type(json_value),pointer :: element !! a child element
95549554
integer(IK) :: i !! counter
95559555
integer(IK) :: icount !! number of children
9556-
95579556
logical(LK) :: finished !! can be used to stop the process
95589557

9559-
if (json%exception_thrown) return
9560-
9561-
!! recursive [[json_value]] traversal.
9562-
95639558
if (json%exception_thrown) return
95649559
call traverse_callback(json,p,finished) ! first call for this object
95659560
if (finished) return
95669561

95679562
!for arrays and objects, have to also call for all children:
95689563
if (p%var_type==json_array .or. p%var_type==json_object) then
95699564

9570-
print *, loc(p), associated(p)
95719565
icount = json%count(p) ! number of children
9572-
print *, icount
95739566
if (icount>0) then
9574-
print *, icount, ">0"
95759567
element => p%children ! first one
95769568
do i = 1, icount ! call for each child
95779569
if (.not. associated(element)) then
95789570
call json%throw_exception('Error in json_traverse: '//&
95799571
'Malformed JSON linked list')
95809572
return
95819573
end if
9582-
call json%traverse(element, traverse_callback)
9574+
call json%traverse(element, traverse_callback) ! this is json_traverse
95839575
if (finished .or. json%exception_thrown) exit
95849576
element => element%next
95859577
end do

0 commit comments

Comments
 (0)
Please sign in to comment.