json_file_get_string Subroutine

private subroutine json_file_get_string(me, path, val, found, default)

Get a character string from a json file. The output val is an allocatable character string.

Arguments

TypeIntentOptionalAttributesName
class(json_file), intent(inout) :: me
character(kind=CK,len=*), intent(in) :: path

the path to the variable

character(kind=CK,len=:), intent(out), allocatable:: val

value

logical(kind=LK), intent(out), optional :: found

if it was really found

character(kind=CK,len=*), intent(in), optional :: default

Contents

Source Code


Source Code

    subroutine json_file_get_string(me, path, val, found, default)

    implicit none

    class(json_file),intent(inout)                   :: me
    character(kind=CK,len=*),intent(in)              :: path  !! the path to the variable
    character(kind=CK,len=:),allocatable,intent(out) :: val   !! value
    logical(LK),intent(out),optional                 :: found !! if it was really found
    character(kind=CK,len=*),intent(in),optional     :: default

    call me%core%get(me%p, path, val, found, default)

    end subroutine json_file_get_string