destroy_json_data Subroutine

private subroutine destroy_json_data(d)

Destroy the data within a json_value, and reset type to json_unknown.

Arguments

Type IntentOptional AttributesName
type(json_value), intent(inout) :: d

Called by

proc~~destroy_json_data~~CalledByGraph proc~destroy_json_data destroy_json_data proc~to_logical to_logical proc~to_logical->proc~destroy_json_data proc~to_integer to_integer proc~to_integer->proc~destroy_json_data proc~to_null to_null proc~to_null->proc~destroy_json_data proc~json_value_destroy json_value_destroy proc~json_value_destroy->proc~destroy_json_data proc~to_object to_object proc~to_object->proc~destroy_json_data proc~to_array to_array proc~to_array->proc~destroy_json_data proc~to_double to_double proc~to_double->proc~destroy_json_data proc~to_string to_string proc~to_string->proc~destroy_json_data

Contents

Source Code


Source Code

    subroutine destroy_json_data(d)

    implicit none

    type(json_value),intent(inout) :: d

    d%var_type = json_unknown

    if (allocated(d%log_value)) deallocate(d%log_value)
    if (allocated(d%int_value)) deallocate(d%int_value)
    if (allocated(d%dbl_value)) deallocate(d%dbl_value)
    if (allocated(d%str_value)) deallocate(d%str_value)

    end subroutine destroy_json_data