json_value_add_real Subroutine

private subroutine json_value_add_real(json, p, name, val)

Add a real value child to the json_value variable.

Arguments

Type IntentOptional AttributesName
class(json_core), intent(inout) :: json
type(json_value), pointer:: p
character(kind=CK,len=*), intent(in) :: name

variable name

real(kind=RK), intent(in) :: val

real value


Contents

Source Code


Source Code

    subroutine json_value_add_real(json,p,name,val)

    implicit none

    class(json_core),intent(inout)      :: json
    type(json_value),pointer            :: p
    character(kind=CK,len=*),intent(in) :: name  !! variable name
    real(RK),intent(in)                 :: val   !! real value

    type(json_value),pointer :: var

    !create the variable:
    call json%create_real(var,val,name)

    !add it:
    call json%add(p, var)

    end subroutine json_value_add_real