Allocate a json_value pointer and make it an integer(IK) variable. The pointer should not already be allocated.
type(json_value),pointer :: p
type(json_core) :: json
call json%create_integer(p,'value',1)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json | |||
type(json_value), | pointer | :: | p | |||
integer(kind=IK), | intent(in) | :: | val | |||
character(kind=CK, len=*), | intent(in) | :: | name |
subroutine json_value_create_integer(json,p,val,name) implicit none class(json_core),intent(inout) :: json type(json_value),pointer :: p integer(IK),intent(in) :: val character(kind=CK,len=*),intent(in) :: name call json_value_create(p) call json%to_integer(p,val,name) end subroutine json_value_create_integer