Given the path string, remove the variable from the json_value structure, 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) | :: | name |
subroutine json_value_remove_if_present(json,p,name)
implicit none
class(json_core),intent(inout) :: json
type(json_value),pointer :: p
character(kind=CK,len=*),intent(in) :: name
type(json_value),pointer :: p_var
logical(LK) :: found
call json%get(p,name,p_var,found)
if (found) call json%remove(p_var)
end subroutine json_value_remove_if_present