Skip to content

Commit 9b162ba

Browse files
committed
revert previous change.
1 parent 431cdc2 commit 9b162ba

File tree

3 files changed

+32
-112
lines changed

3 files changed

+32
-112
lines changed

src/json_file_module.F90

Lines changed: 2 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -280,34 +280,7 @@ subroutine initialize_json_core_in_file(me,verbose,compact_reals,&
280280
implicit none
281281

282282
class(json_file),intent(inout) :: me
283-
logical(LK),intent(in),optional :: verbose !! mainly useful for debugging (default is false)
284-
logical(LK),intent(in),optional :: compact_reals !! to compact the real number strings for output (default is true)
285-
logical(LK),intent(in),optional :: print_signs !! always print numeric sign (default is false)
286-
character(kind=CDK,len=*),intent(in),optional :: real_format !! Real number format: 'E' [default], '*', 'G', 'EN', or 'ES'
287-
integer(IK),intent(in),optional :: spaces_per_tab !! number of spaces per tab for indenting (default is 2)
288-
logical(LK),intent(in),optional :: strict_type_checking !! if true, no integer, double, or logical type
289-
!! conversions are done for the `get` routines
290-
!! (default is false)
291-
logical(LK),intent(in),optional :: trailing_spaces_significant !! for name and path comparisons, is trailing
292-
!! space to be considered significant.
293-
!! (default is false)
294-
logical(LK),intent(in),optional :: case_sensitive_keys !! for name and path comparisons, are they
295-
!! case sensitive. (default is true)
296-
logical(LK),intent(in),optional :: no_whitespace !! if true, printing the JSON structure is
297-
!! done without adding any non-significant
298-
!! spaces or linebreaks (default is false)
299-
logical(LK),intent(in),optional :: unescape_strings !! If false, then the raw escaped
300-
!! string is returned from [[json_get_string]]
301-
!! and similar routines. If true [default],
302-
!! then the string is returned unescaped.
303-
character(kind=CK,len=1),intent(in),optional :: comment_char !! If present, this character is used
304-
!! to denote comments in the JSON file,
305-
!! which will be ignored if present.
306-
!! Example: `!` or `#`.
307-
logical(LK),intent(in),optional :: use_rfc6901_paths !! If true, then path values in the
308-
!! `get_by_path` routines are interpreted
309-
!! as RFC 6901 "JSON Pointer" paths.
310-
!! By default, this is False.
283+
#include "json_initialize_arguments.inc"
311284

312285
call me%core%initialize(verbose,compact_reals,&
313286
print_signs,real_format,spaces_per_tab,&
@@ -386,34 +359,7 @@ function initialize_json_file(p,verbose,compact_reals,&
386359
type(json_file) :: file_object
387360
type(json_value),pointer,optional,intent(in) :: p !! `json_value` object to cast
388361
!! as a `json_file` object
389-
logical(LK),intent(in),optional :: verbose !! mainly useful for debugging (default is false)
390-
logical(LK),intent(in),optional :: compact_reals !! to compact the real number strings for output (default is true)
391-
logical(LK),intent(in),optional :: print_signs !! always print numeric sign (default is false)
392-
character(kind=CDK,len=*),intent(in),optional :: real_format !! Real number format: 'E' [default], '*', 'G', 'EN', or 'ES'
393-
integer(IK),intent(in),optional :: spaces_per_tab !! number of spaces per tab for indenting (default is 2)
394-
logical(LK),intent(in),optional :: strict_type_checking !! if true, no integer, double, or logical type
395-
!! conversions are done for the `get` routines
396-
!! (default is false)
397-
logical(LK),intent(in),optional :: trailing_spaces_significant !! for name and path comparisons, is trailing
398-
!! space to be considered significant.
399-
!! (default is false)
400-
logical(LK),intent(in),optional :: case_sensitive_keys !! for name and path comparisons, are they
401-
!! case sensitive. (default is true)
402-
logical(LK),intent(in),optional :: no_whitespace !! if true, printing the JSON structure is
403-
!! done without adding any non-significant
404-
!! spaces or linebreaks (default is false)
405-
logical(LK),intent(in),optional :: unescape_strings !! If false, then the raw escaped
406-
!! string is returned from [[json_get_string]]
407-
!! and similar routines. If true [default],
408-
!! then the string is returned unescaped.
409-
character(kind=CK,len=1),intent(in),optional :: comment_char !! If present, this character is used
410-
!! to denote comments in the JSON file,
411-
!! which will be ignored if present.
412-
!! Example: `!` or `#`.
413-
logical(LK),intent(in),optional :: use_rfc6901_paths !! If true, then path values in the
414-
!! `get_by_path` routines are interpreted
415-
!! as RFC 6901 "JSON Pointer" paths.
416-
!! By default, this is False.
362+
#include "json_initialize_arguments.inc"
417363

418364
call file_object%initialize(verbose,compact_reals,&
419365
print_signs,real_format,spaces_per_tab,&

src/json_initialize_arguments.inc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
logical(LK),intent(in),optional :: verbose !! mainly useful for debugging (default is false)
2+
logical(LK),intent(in),optional :: compact_reals !! to compact the real number strings for output (default is true)
3+
logical(LK),intent(in),optional :: print_signs !! always print numeric sign (default is false)
4+
character(kind=CDK,len=*),intent(in),optional :: real_format !! Real number format: 'E' [default], '*', 'G', 'EN', or 'ES'
5+
integer(IK),intent(in),optional :: spaces_per_tab !! number of spaces per tab for indenting (default is 2)
6+
logical(LK),intent(in),optional :: strict_type_checking !! if true, no integer, double, or logical type
7+
!! conversions are done for the `get` routines
8+
!! (default is false)
9+
logical(LK),intent(in),optional :: trailing_spaces_significant !! for name and path comparisons, is trailing
10+
!! space to be considered significant.
11+
!! (default is false)
12+
logical(LK),intent(in),optional :: case_sensitive_keys !! for name and path comparisons, are they
13+
!! case sensitive. (default is true)
14+
logical(LK),intent(in),optional :: no_whitespace !! if true, printing the JSON structure is
15+
!! done without adding any non-significant
16+
!! spaces or linebreaks (default is false)
17+
logical(LK),intent(in),optional :: unescape_strings !! If false, then the raw escaped
18+
!! string is returned from [[json_get_string]]
19+
!! and similar routines. If true [default],
20+
!! then the string is returned unescaped.
21+
character(kind=CK,len=1),intent(in),optional :: comment_char !! If present, this character is used
22+
!! to denote comments in the JSON file,
23+
!! which will be ignored if present.
24+
!! Example: `!` or `#`.
25+
logical(LK),intent(in),optional :: use_rfc6901_paths !! If true, then path values in the
26+
!! `get_by_path` routines are interpreted
27+
!! as RFC 6901 "JSON Pointer" paths.
28+
!! By default, this is False.

src/json_value_module.F90

Lines changed: 2 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -658,34 +658,7 @@ function initialize_json_core(verbose,compact_reals,&
658658
implicit none
659659

660660
type(json_core) :: json_core_object
661-
logical(LK),intent(in),optional :: verbose !! mainly useful for debugging (default is false)
662-
logical(LK),intent(in),optional :: compact_reals !! to compact the real number strings for output (default is true)
663-
logical(LK),intent(in),optional :: print_signs !! always print numeric sign (default is false)
664-
character(kind=CDK,len=*),intent(in),optional :: real_format !! Real number format: 'E' [default], '*', 'G', 'EN', or 'ES'
665-
integer(IK),intent(in),optional :: spaces_per_tab !! number of spaces per tab for indenting (default is 2)
666-
logical(LK),intent(in),optional :: strict_type_checking !! if true, no integer, double, or logical type
667-
!! conversions are done for the `get` routines
668-
!! (default is false)
669-
logical(LK),intent(in),optional :: trailing_spaces_significant !! for name and path comparisons, is trailing
670-
!! space to be considered significant.
671-
!! (default is false)
672-
logical(LK),intent(in),optional :: case_sensitive_keys !! for name and path comparisons, are they
673-
!! case sensitive. (default is true)
674-
logical(LK),intent(in),optional :: no_whitespace !! if true, printing the JSON structure is
675-
!! done without adding any non-significant
676-
!! spaces or linebreaks (default is false)
677-
logical(LK),intent(in),optional :: unescape_strings !! If false, then the raw escaped
678-
!! string is returned from [[json_get_string]]
679-
!! and similar routines. If true [default],
680-
!! then the string is returned unescaped.
681-
character(kind=CK,len=1),intent(in),optional :: comment_char !! If present, this character is used
682-
!! to denote comments in the JSON file,
683-
!! which will be ignored if present.
684-
!! Example: `!` or `#`.
685-
logical(LK),intent(in),optional :: use_rfc6901_paths !! If true, then path values in the
686-
!! `get_by_path` routines are interpreted
687-
!! as RFC 6901 "JSON Pointer" paths.
688-
!! By default, this is False.
661+
#include "json_initialize_arguments.inc"
689662

690663
call json_core_object%initialize(verbose,compact_reals,&
691664
print_signs,real_format,spaces_per_tab,&
@@ -732,34 +705,7 @@ subroutine json_initialize(json,verbose,compact_reals,&
732705
implicit none
733706

734707
class(json_core),intent(inout) :: json
735-
logical(LK),intent(in),optional :: verbose !! mainly useful for debugging (default is false)
736-
logical(LK),intent(in),optional :: compact_reals !! to compact the real number strings for output (default is true)
737-
logical(LK),intent(in),optional :: print_signs !! always print numeric sign (default is false)
738-
character(kind=CDK,len=*),intent(in),optional :: real_format !! Real number format: 'E' [default], '*', 'G', 'EN', or 'ES'
739-
integer(IK),intent(in),optional :: spaces_per_tab !! number of spaces per tab for indenting (default is 2)
740-
logical(LK),intent(in),optional :: strict_type_checking !! if true, no integer, double, or logical type
741-
!! conversions are done for the `get` routines
742-
!! (default is false)
743-
logical(LK),intent(in),optional :: trailing_spaces_significant !! for name and path comparisons, is trailing
744-
!! space to be considered significant.
745-
!! (default is false)
746-
logical(LK),intent(in),optional :: case_sensitive_keys !! for name and path comparisons, are they
747-
!! case sensitive. (default is true)
748-
logical(LK),intent(in),optional :: no_whitespace !! if true, printing the JSON structure is
749-
!! done without adding any non-significant
750-
!! spaces or linebreaks (default is false)
751-
logical(LK),intent(in),optional :: unescape_strings !! If false, then the raw escaped
752-
!! string is returned from [[json_get_string]]
753-
!! and similar routines. If true [default],
754-
!! then the string is returned unescaped.
755-
character(kind=CK,len=1),intent(in),optional :: comment_char !! If present, this character is used
756-
!! to denote comments in the JSON file,
757-
!! which will be ignored if present.
758-
!! Example: `!` or `#`.
759-
logical(LK),intent(in),optional :: use_rfc6901_paths !! If true, then path values in the
760-
!! `get_by_path` routines are interpreted
761-
!! as RFC 6901 "JSON Pointer" paths.
762-
!! By default, this is False.
708+
#include "json_initialize_arguments.inc"
763709

764710
character(kind=CDK,len=10) :: w !! max string length
765711
character(kind=CDK,len=10) :: d !! real precision digits

0 commit comments

Comments
 (0)