Allocate a json_value pointer and make it a logical(LK) variable. The pointer should not already be allocated.
type(json_value),pointer :: p
type(json_core) :: json
call json%create_logical(p,'value',.true.)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | pointer | :: | p | |||
logical(kind=LK), | intent(in) | :: | val |
variable value |
||
character(kind=CK, len=*), | intent(in) | :: | name |
variable name |
subroutine json_value_create_logical(json,p,val,name) implicit none class(json_core),intent(inout) :: json type(json_value),pointer :: p logical(LK),intent(in) :: val !! variable value character(kind=CK,len=*),intent(in) :: name !! variable name call json_value_create(p) call json%to_logical(p,val,name) end subroutine json_value_create_logical