@@ -299,9 +299,6 @@ subroutine json_file_print_to_console(me)
299
299
300
300
class(json_file),intent (inout ) :: me
301
301
302
- ! character(kind=CK,len=:),allocatable :: dummy
303
-
304
- ! call json_value_print(me%p,iunit=output_unit,str=dummy,indent=1,colon=.true.)
305
302
call json_print(me% p,iunit= output_unit)
306
303
307
304
end subroutine json_file_print_to_console
@@ -320,12 +317,7 @@ subroutine json_file_print_1(me, iunit)
320
317
class(json_file),intent (inout ) :: me
321
318
integer (IK),intent (in ) :: iunit ! ! file unit number (must not be -1)
322
319
323
- ! integer(IK) :: i
324
- ! character(kind=CK,len=:),allocatable :: dummy
325
-
326
320
if (iunit/= unit2str) then
327
- ! i = iunit
328
- ! call json_value_print(me%p,iunit=i,str=dummy,indent=1,colon=.true.)
329
321
call json_print(me% p,iunit= iunit)
330
322
else
331
323
call throw_exception(' Error in json_file_print_1: iunit must not be -1.' )
@@ -359,18 +351,7 @@ subroutine json_file_print_2(me,filename)
359
351
class(json_file),intent (inout ) :: me
360
352
character (kind= CDK,len=* ),intent (in ) :: filename ! ! filename to print to
361
353
362
- integer (IK) :: iunit,istat
363
-
364
- ! ...note: why not just call [[json_print_2]] here?
365
-
366
- open (newunit= iunit,file= filename,status= ' REPLACE' ,iostat= istat FILE_ENCODING )
367
- if (istat== 0 ) then
368
- call me% print_file(iunit) ! call the other routine
369
- close (iunit,iostat= istat)
370
- else
371
- call throw_exception(' Error in json_file_print_2: could not open file: ' // &
372
- trim (filename))
373
- end if
354
+ call json_print(me% p,filename)
374
355
375
356
end subroutine json_file_print_2
376
357
! *****************************************************************************************
0 commit comments