json_prepare_parser Subroutine

private subroutine json_prepare_parser(json)

Internal routine to be called before parsing JSON. Currently, all this does it allocate the comment_char if none was specified.

Type Bound

json_core

Arguments

Type IntentOptional Attributes Name
class(json_core), intent(inout) :: json

Called by

proc~~json_prepare_parser~~CalledByGraph proc~json_prepare_parser json_value_module::json_core%json_prepare_parser proc~json_parse_file json_value_module::json_core%json_parse_file proc~json_parse_file->proc~json_prepare_parser proc~json_parse_string json_value_module::json_core%json_parse_string proc~json_parse_string->proc~json_prepare_parser none~deserialize json_value_module::json_core%deserialize none~deserialize->proc~json_parse_string proc~wrap_json_parse_string json_value_module::json_core%wrap_json_parse_string none~deserialize->proc~wrap_json_parse_string none~load json_value_module::json_core%load none~load->proc~json_parse_file proc~json_file_load json_file_module::json_file%json_file_load proc~json_file_load->none~load proc~json_file_load_from_string json_file_module::json_file%json_file_load_from_string proc~json_file_load_from_string->none~deserialize proc~wrap_json_parse_string->none~deserialize none~deserialize~2 json_file_module::json_file%deserialize none~deserialize~2->proc~json_file_load_from_string proc~wrap_json_file_load_from_string json_file_module::json_file%wrap_json_file_load_from_string none~deserialize~2->proc~wrap_json_file_load_from_string proc~assign_string_to_json_file json_file_module::json_file%assign_string_to_json_file proc~assign_string_to_json_file->none~deserialize~2 proc~initialize_json_file_from_string json_file_module::initialize_json_file_from_string proc~initialize_json_file_from_string->none~deserialize~2 proc~initialize_json_file_from_string_v2 json_file_module::initialize_json_file_from_string_v2 proc~initialize_json_file_from_string_v2->none~deserialize~2 proc~wrap_json_file_load_from_string->none~deserialize~2 interface~json_file json_file_module::json_file interface~json_file->proc~initialize_json_file_from_string interface~json_file->proc~initialize_json_file_from_string_v2 proc~wrap_initialize_json_file_from_string json_file_module::wrap_initialize_json_file_from_string interface~json_file->proc~wrap_initialize_json_file_from_string proc~wrap_initialize_json_file_from_string_v2 json_file_module::wrap_initialize_json_file_from_string_v2 interface~json_file->proc~wrap_initialize_json_file_from_string_v2 proc~wrap_assign_string_to_json_file json_file_module::json_file%wrap_assign_string_to_json_file proc~wrap_assign_string_to_json_file->proc~assign_string_to_json_file proc~wrap_initialize_json_file_from_string->proc~initialize_json_file_from_string proc~wrap_initialize_json_file_from_string_v2->proc~initialize_json_file_from_string_v2

Source Code

    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