private subroutine json_value_add_integer(me, name, val)
Arguments
Type |
Intent | Optional |
Attributes | | Name | |
type(json_value), |
intent(inout), |
|
pointer | :: |
me | |
character(kind=CK,len=*), |
intent(in) |
|
| :: |
name | |
integer(kind=IK), |
intent(in) |
|
| :: |
val | |
Description
Add an integer value child to the json_value variable
Note
This routine is part of the public
API that can be
used to build a
JSON structure using
json_value pointers.
Variables
Type | Visibility |
Attributes | | Name | | Initial | |
type(json_value), |
public, |
pointer | :: |
var | | | |
Source Code
subroutine json_value_add_integer(me, name, val)
implicit none
type(json_value),pointer :: me
character(kind=CK,len=*),intent(in) :: name
integer(IK),intent(in) :: val
type(json_value),pointer :: var
!create the variable:
call json_value_create(var)
call to_integer(var,val,name)
!add it:
call json_add(me, var)
!cleanup:
nullify(var)
end subroutine json_value_add_integer