Internal routine to be called before parsing JSON.
Currently, all this does it allocate the comment_char
if none was specified.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(json_core), | intent(inout) | :: | json |
subroutine json_prepare_parser(json)
implicit none
class(json_core),intent(inout) :: json
if (json%allow_comments .and. .not. allocated(json%comment_char)) then
! comments are enabled, but user hasn't set the comment char,
! so in this case use the default:
json%comment_char = CK_'/!#'
end if
end subroutine json_prepare_parser