json_value_to_string Subroutine

private subroutine json_value_to_string(json, p, str)

Print the json_value structure to an allocatable string.

Arguments

Type IntentOptional AttributesName
class(json_core), intent(inout) :: json
type(json_value), intent(in), pointer:: p
character(kind=CK,len=:), intent(out), allocatable:: str

prints structure to this string


Contents

Source Code


Source Code

    subroutine json_value_to_string(json,p,str)

    implicit none

    class(json_core),intent(inout)                   :: json
    type(json_value),pointer,intent(in)              :: p
    character(kind=CK,len=:),intent(out),allocatable :: str  !! prints structure to this string

    str = CK_''
    call json%json_value_print(p, iunit=unit2str, str=str, indent=1_IK, colon=.true.)

    end subroutine json_value_to_string