@@ -101,6 +101,7 @@ module json_file_module
101
101
MAYBEWRAP(json_file_get_double_vec), &
102
102
MAYBEWRAP(json_file_get_logical_vec), &
103
103
MAYBEWRAP(json_file_get_string_vec), &
104
+ MAYBEWRAP(json_file_get_alloc_string_vec), &
104
105
json_file_get_root
105
106
106
107
generic,public :: update = > MAYBEWRAP(json_file_update_integer), &
@@ -140,6 +141,7 @@ module json_file_module
140
141
procedure :: MAYBEWRAP(json_file_get_double_vec)
141
142
procedure :: MAYBEWRAP(json_file_get_logical_vec)
142
143
procedure :: MAYBEWRAP(json_file_get_string_vec)
144
+ procedure :: MAYBEWRAP(json_file_get_alloc_string_vec)
143
145
procedure :: json_file_get_root
144
146
145
147
! update:
@@ -1120,6 +1122,52 @@ subroutine wrap_json_file_get_string_vec(me, path, vec, found)
1120
1122
end subroutine wrap_json_file_get_string_vec
1121
1123
! *****************************************************************************************
1122
1124
1125
+ ! *****************************************************************************************
1126
+ ! > author: Jacob Williams
1127
+ ! date: 12/17/2016
1128
+ !
1129
+ ! Get an (allocatable length) string vector from a JSON file.
1130
+ ! This is just a wrapper for [[json_get_alloc_string_vec_with_path]].
1131
+
1132
+ subroutine json_file_get_alloc_string_vec (me , path , vec , ilen , found )
1133
+
1134
+ implicit none
1135
+
1136
+ class(json_file),intent (inout ) :: me
1137
+ character (kind= CK,len=* ),intent (in ) :: path
1138
+ character (kind= CK,len= :),dimension (:),allocatable ,intent (out ) :: vec
1139
+ integer (IK),dimension (:),allocatable ,intent (out ) :: ilen ! ! the actual length
1140
+ ! ! of each character
1141
+ ! ! string in the array
1142
+ logical (LK),intent (out ),optional :: found
1143
+
1144
+ call me% core% get(me% p, path, vec, ilen, found)
1145
+
1146
+ end subroutine json_file_get_alloc_string_vec
1147
+ ! *****************************************************************************************
1148
+
1149
+ ! *****************************************************************************************
1150
+ ! >
1151
+ ! Alternate version of [[json_file_get_alloc_string_vec]], where "path" is kind=CDK.
1152
+ ! This is just a wrapper for [[wrap_json_get_alloc_string_vec_with_path]].
1153
+
1154
+ subroutine wrap_json_file_get_alloc_string_vec (me , path , vec , ilen , found )
1155
+
1156
+ implicit none
1157
+
1158
+ class(json_file),intent (inout ) :: me
1159
+ character (kind= CDK,len=* ),intent (in ) :: path
1160
+ character (kind= CK,len= :),dimension (:),allocatable ,intent (out ) :: vec
1161
+ integer (IK),dimension (:),allocatable ,intent (out ) :: ilen ! ! the actual length
1162
+ ! ! of each character
1163
+ ! ! string in the array
1164
+ logical (LK),intent (out ),optional :: found
1165
+
1166
+ call me% get(to_unicode(path), vec, ilen, found)
1167
+
1168
+ end subroutine wrap_json_file_get_alloc_string_vec
1169
+ ! *****************************************************************************************
1170
+
1123
1171
! *****************************************************************************************
1124
1172
! > author: Jacob Williams
1125
1173
! date:1/10/2015
0 commit comments