From da52640501a71bd6970d8eff7468abd4f2a64d1b Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Sun, 12 Feb 2017 20:34:53 -0600 Subject: [PATCH 1/2] allow blank comment_char to disable comments. --- src/json_value_module.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/json_value_module.F90 b/src/json_value_module.F90 index c477eb23c1..0cb684983c 100644 --- a/src/json_value_module.F90 +++ b/src/json_value_module.F90 @@ -769,8 +769,9 @@ subroutine json_initialize(json,verbose,compact_reals,& end if ! if we are allowing comments in the file: + ! [an empty string disables comments] if (present(comment_char)) then - json%allow_comments = .true. + json%allow_comments = comment_char/=CK_'' json%comment_char = comment_char end if From 4d01459ed51b4ed93a4d402e5c5e0dfe8da8e046 Mon Sep 17 00:00:00 2001 From: Jacob Williams Date: Sun, 12 Feb 2017 20:40:39 -0600 Subject: [PATCH 2/2] comment update. --- src/json_initialize_arguments.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/json_initialize_arguments.inc b/src/json_initialize_arguments.inc index fc453e8feb..4965346e00 100644 --- a/src/json_initialize_arguments.inc +++ b/src/json_initialize_arguments.inc @@ -21,7 +21,9 @@ character(kind=CK,len=1),intent(in),optional :: comment_char !! If present, this character is used !! to denote comments in the JSON file, !! which will be ignored if present. - !! Example: `!` or `#`. + !! Example: `!` or `#`. Setting this + !! to a blank string disables the + !! ignoring of comments. (Default is `!`). integer(IK),intent(in),optional :: path_mode !! How the path strings are interpreted in the !! `get_by_path` routines: !!