json_valid_path Function

private function json_valid_path(json, p, path) result(found)

Returns true if the path is present in the p JSON structure.

Arguments

Type IntentOptional AttributesName
class(json_core), intent(inout) :: json
type(json_value), intent(in), pointer:: p

a JSON linked list

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

path to the variable

Return Value logical(kind=LK)

true if it was found


Contents

Source Code


Source Code

    function json_valid_path(json, p, path) result(found)

    implicit none

    class(json_core),intent(inout)       :: json
    type(json_value),pointer,intent(in)  :: p      !! a JSON linked list
    character(kind=CK,len=*),intent(in)  :: path   !! path to the variable
    logical(LK)                          :: found  !! true if it was found

    type(json_value),pointer :: tmp  !! pointer to the variable specified by `path`

    call json%get(p, path, tmp, found)

    end function json_valid_path