json_value_create Subroutine

private subroutine json_value_create(p)

Allocate a json_value pointer variable. This should be called before adding data to it.

Example

    type(json_value),pointer :: var
    call json_value_create(var)
    call json%to_real(var,1.0_RK)

Notes

  1. This routine does not check for exceptions.
  2. The pointer should not already be allocated, or a memory leak will occur.

Arguments

Type IntentOptional Attributes Name
type(json_value), pointer :: p

Source Code

    subroutine json_value_create(p)

    implicit none

    type(json_value),pointer :: p

    nullify(p)
    allocate(p)

    end subroutine json_value_create