Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/json_initialize_arguments.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
!!
Expand Down
3 changes: 2 additions & 1 deletion src/json_value_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down