Add an integer value to a json_value, given the path.
then this routine will destroy it and replace it with the
new value.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(json_core), | intent(inout) | :: | json | |||
| type(json_value), | pointer | :: | me |
the JSON structure |
||
| character(kind=CK, len=*), | intent(in) | :: | path |
the path to the variable |
||
| integer(kind=IK), | intent(in) | :: | value |
the value to add |
||
| logical(kind=LK), | intent(out), | optional | :: | found |
if the variable was found |
|
| logical(kind=LK), | intent(out), | optional | :: | was_created |
if the variable had to be created |
subroutine json_add_integer_by_path(json,me,path,value,found,was_created) implicit none integer(IK),intent(in) :: value !! the value to add integer(IK),parameter :: json_type = json_integer !! type of the value to add #include "json_add_scalar_by_path.inc" contains subroutine assign() p%int_value = value end subroutine assign subroutine create() call json%create_integer(tmp,value,name) end subroutine create end subroutine json_add_integer_by_path