@@ -6721,7 +6721,7 @@ subroutine json_get_path(json, p, path, found, use_alt_array_tokens, path_sep)
6721
6721
6722
6722
! get info about the current variable:
6723
6723
call json% info(tmp,name= name)
6724
- if (json% path_mode== 2 ) then
6724
+ if (json% path_mode== 2_IK ) then
6725
6725
name = encode_rfc6901(name)
6726
6726
end if
6727
6727
@@ -6731,7 +6731,7 @@ subroutine json_get_path(json, p, path, found, use_alt_array_tokens, path_sep)
6731
6731
! get info about the parent:
6732
6732
call json% info(tmp% parent,var_type= var_type,&
6733
6733
n_children= n_children,name= parent_name)
6734
- if (json% path_mode== 2 ) then
6734
+ if (json% path_mode== 2_IK ) then
6735
6735
parent_name = encode_rfc6901(parent_name)
6736
6736
end if
6737
6737
@@ -6758,19 +6758,19 @@ subroutine json_get_path(json, p, path, found, use_alt_array_tokens, path_sep)
6758
6758
end if
6759
6759
end do
6760
6760
select case (json% path_mode)
6761
- case (3 )
6761
+ case (3_IK )
6762
6762
! JSONPath "bracket-notation"
6763
6763
! example: `$['key'][1]`
6764
6764
! [note: this uses 1-based indices]
6765
6765
call integer_to_string(i,int_fmt,istr)
6766
6766
call add_to_path(start_array// single_quote// parent_name// &
6767
6767
single_quote// end_array// &
6768
6768
start_array// trim (adjustl (istr))// end_array,CK_' ' )
6769
- case (2 )
6769
+ case (2_IK )
6770
6770
! rfc6901
6771
6771
call integer_to_string(i-1 ,int_fmt,istr) ! 0-based index
6772
6772
call add_to_path(parent_name// slash// trim (adjustl (istr)))
6773
- case (1 )
6773
+ case (1_IK )
6774
6774
! default
6775
6775
call integer_to_string(i,int_fmt,istr)
6776
6776
if (use_brackets) then
@@ -6787,7 +6787,7 @@ subroutine json_get_path(json, p, path, found, use_alt_array_tokens, path_sep)
6787
6787
6788
6788
! process parent on the next pass
6789
6789
select case (json% path_mode)
6790
- case (3 )
6790
+ case (3_IK )
6791
6791
call add_to_path(start_array// single_quote// name// &
6792
6792
single_quote// end_array,CK_' ' )
6793
6793
case default
@@ -6807,7 +6807,7 @@ subroutine json_get_path(json, p, path, found, use_alt_array_tokens, path_sep)
6807
6807
else
6808
6808
! the last one:
6809
6809
select case (json% path_mode)
6810
- case (3 )
6810
+ case (3_IK )
6811
6811
call add_to_path(start_array// single_quote// name// &
6812
6812
single_quote// end_array,CK_' ' )
6813
6813
case default
@@ -6836,10 +6836,10 @@ subroutine json_get_path(json, p, path, found, use_alt_array_tokens, path_sep)
6836
6836
path = CK_' '
6837
6837
else
6838
6838
select case (json% path_mode)
6839
- case (3 )
6839
+ case (3_IK )
6840
6840
! add the outer level object identifier:
6841
6841
path = root// path
6842
- case (2 )
6842
+ case (2_IK )
6843
6843
! add the root slash:
6844
6844
path = slash// path
6845
6845
end select
@@ -6866,21 +6866,21 @@ subroutine add_to_path(str,path_sep)
6866
6866
! ! (ignored if `json%path_mode/=1`)
6867
6867
6868
6868
select case (json% path_mode)
6869
- case (3 )
6869
+ case (3_IK )
6870
6870
! in this case, the options are ignored
6871
6871
if (.not. allocated (path)) then
6872
6872
path = str
6873
6873
else
6874
6874
path = str// path
6875
6875
end if
6876
- case (2 )
6876
+ case (2_IK )
6877
6877
! in this case, the options are ignored
6878
6878
if (.not. allocated (path)) then
6879
6879
path = str
6880
6880
else
6881
6881
path = str// slash// path
6882
6882
end if
6883
- case (1 )
6883
+ case (1_IK )
6884
6884
! default path format
6885
6885
if (.not. allocated (path)) then
6886
6886
path = str
0 commit comments