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 object.
subroutine to_object(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_object
!name:
if (present(name)) me%name = trim(name)
end subroutine to_object