These are like json_add, except if a child with the same name is already present, then its value is simply updated. Note that currently, these only work for scalar variables. These routines can also change the variable's type (but an error will be thrown if the existing variable is not a scalar).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | |||
logical(kind=LK), | intent(in) | :: | val | |||
logical(kind=LK), | intent(out) | :: | found |
Given the path string, if the variable is present, and is a scalar, then update its value. If it is not present, then create it and set its value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | |||
real(kind=RK), | intent(in) | :: | val | |||
logical(kind=LK), | intent(out) | :: | found |
Given the path string, if the variable is present, and is a scalar, then update its value. If it is not present, then create it and set its value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | |||
integer(kind=IK), | intent(in) | :: | val | |||
logical(kind=LK), | intent(out) | :: | found |
Given the path string, if the variable is present, and is a scalar, then update its value. If it is not present, then create it and set its value.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(json_value), | , | pointer | :: | p | ||
character(kind=CK,len=*), | intent(in) | :: | name | |||
character(kind=CK,len=*), | intent(in) | :: | val | |||
logical(kind=LK), | intent(out) | :: | found |
Given the path string, if the variable is present, and is a scalar, then update its value. If it is not present, then create it and set its value.