Print the json_value structure to a file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | intent(in), | pointer | :: | p | ||
integer(kind=IK), | intent(in) | :: | iunit | the file unit (the file must already have been opened, can't be -1). |
subroutine json_print_1(json,p,iunit)
implicit none
class(json_core),intent(inout) :: json
type(json_value),pointer,intent(in) :: p
integer(IK),intent(in) :: iunit !! the file unit (the file must
!! already have been opened, can't be -1).
character(kind=CK,len=:),allocatable :: dummy
if (iunit/=unit2str) then
call json%json_value_print(p,iunit,str=dummy, indent=1, colon=.true.)
else
call json%throw_exception('Error in json_print_1: iunit must not be -1.')
end if
end subroutine json_print_1