json_print_2 Subroutine

private subroutine json_print_2(me, filename)

Arguments

Type IntentOptional AttributesName
type(json_value), intent(in), pointer:: me
character(kind=CDK,len=*), intent(in) :: filename

the filename to print to (should not already be open)

Description

Print the json_value structure to a file.

Calls

proc~~json_print_2~~CallsGraph proc~json_print_2 json_print_2 interface~json_print json_print proc~json_print_2->interface~json_print interface~throw_exception throw_exception proc~json_print_2->interface~throw_exception interface~json_print->proc~json_print_2 proc~json_print_1 json_print_1 interface~json_print->proc~json_print_1 proc~json_throw_exception json_throw_exception interface~throw_exception->proc~json_throw_exception proc~json_print_1->interface~throw_exception proc~json_value_print json_value_print proc~json_print_1->proc~json_value_print proc~json_value_print->interface~throw_exception proc~json_value_print->proc~json_value_print 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~compact_real_string compact_real_string proc~real_to_string->proc~compact_real_string
Help

Called By

proc~~json_print_2~~CalledByGraph proc~json_print_2 json_print_2 interface~json_print json_print proc~json_print_2->interface~json_print interface~json_print->proc~json_print_2 proc~test_7 test_7 proc~test_7->interface~json_print proc~test_2 test_2 proc~test_2->interface~json_print proc~test_12 test_12 proc~test_12->interface~json_print proc~test_8 test_8 proc~test_8->interface~json_print proc~test_4 test_4 proc~test_4->interface~json_print proc~test_14 test_14 proc~test_14->interface~json_print program~jf_test_7 jf_test_7 program~jf_test_7->proc~test_7 program~jf_test_2 jf_test_2 program~jf_test_2->proc~test_2 program~jf_test_12 jf_test_12 program~jf_test_12->proc~test_12 program~jf_test_8 jf_test_8 program~jf_test_8->proc~test_8 program~jf_test_4 jf_test_4 program~jf_test_4->proc~test_4 program~jf_test_14 jf_test_14 program~jf_test_14->proc~test_14
Help

Variables

TypeVisibility AttributesNameInitial
integer(kind=IK), public :: iunit
integer(kind=IK), public :: istat

Source Code

    subroutine json_print_2(me,filename)

    implicit none

    type(json_value),pointer,intent(in)  :: me
    character(kind=CDK,len=*),intent(in) :: filename  !! the filename to print to (should not already be open)

    integer(IK) :: iunit,istat

    open(newunit=iunit,file=filename,status='REPLACE',iostat=istat FILE_ENCODING )
    if (istat==0) then
        call json_print(me,iunit)
        close(iunit,iostat=istat)
    else
        call throw_exception('Error in json_print: could not open file: '//&
                              trim(filename))
    end if

    end subroutine json_print_2