Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(json_value), | intent(inout) | :: | me | |||
character(kind=CK,len=*), | intent(in), | optional | :: | name | if the name is also to be changed. |
Change the json_value variable to an array.
subroutine to_array(me,name)
implicit none
type(json_value),intent(inout) :: me
character(kind=CK,len=*),intent(in),optional :: name !! if the name is also to be changed.
!set type and value:
call destroy_json_data(me)
me%var_type = json_array
!name:
if (present(name)) me%name = trim(name)
end subroutine to_array