Given the path string, remove the variable from json_value, if it exists.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | pointer | :: | p | |||
character(kind=CK, len=*), | intent(in) | :: | path |
the path to the variable to remove |
subroutine json_value_remove_if_present(json,p,path) implicit none class(json_core),intent(inout) :: json type(json_value),pointer :: p character(kind=CK,len=*),intent(in) :: path !! the path to the variable to remove type(json_value),pointer :: p_var logical(LK) :: found call json%get(p,path,p_var,found) if (found) call json%remove(p_var) end subroutine json_value_remove_if_present