is_json_object_start Function

function is_json_object_start(line) result(is_start)

Return true for section object lines like {.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: line

Current JSON line to classify

Return Value logical

Whether this line is the start of a JSON object


Source Code

  function is_json_object_start(line) result(is_start)
    !! Return true for section object lines like `{`.
    implicit none

    ! Arguments
    character(*), intent(in) :: line
    !! Current JSON line to classify

    logical :: is_start
    !! Whether this line is the start of a JSON object

    is_start = index(line, '{') .gt. 0 .and. &
         index(line, '"') .eq. 0

  end function is_json_object_start