json_file_print_1 Subroutine

private subroutine json_file_print_1(me, iunit)

Arguments

Type IntentOptional AttributesName
class(json_file), intent(inout) :: me
integer(kind=IK), intent(in) :: iunit

file unit number (must not be -1)

Description

Prints the JSON file to the specified file unit number.

Calls

proc~~json_file_print_1~~CallsGraph proc~json_file_print_1 json_file_print_1 proc~json_value_print json_value_print proc~json_file_print_1->proc~json_value_print interface~throw_exception throw_exception proc~json_file_print_1->interface~throw_exception proc~json_value_print->proc~json_value_print proc~json_value_print->interface~throw_exception proc~real_to_string real_to_string proc~json_value_print->proc~real_to_string proc~json_count json_count proc~json_value_print->proc~json_count proc~integer_to_string integer_to_string proc~json_value_print->proc~integer_to_string none~write_it write_it proc~json_value_print->none~write_it proc~json_throw_exception json_throw_exception interface~throw_exception->proc~json_throw_exception proc~compact_real_string compact_real_string proc~real_to_string->proc~compact_real_string
Help

Variables

TypeVisibility AttributesNameInitial
integer(kind=IK), public :: i
character(kind=CK,len=:), public, allocatable:: dummy

Source Code

    subroutine json_file_print_1(me, iunit)

    implicit none

    class(json_file),intent(inout)  :: me
    integer(IK),intent(in)          :: iunit  !! file unit number (must not be -1)

    integer(IK) :: i
    character(kind=CK,len=:),allocatable :: dummy

    if (iunit/=unit2str) then
        i = iunit
        call json_value_print(me%p,iunit=i,str=dummy,indent=1,colon=.true.)
    else
        call throw_exception('Error in json_file_print_1: iunit must not be -1.')
    end if

    end subroutine json_file_print_1