@@ -101,6 +101,7 @@ module json_file_module
101101 MAYBEWRAP(json_file_get_double_vec), &
102102 MAYBEWRAP(json_file_get_logical_vec), &
103103 MAYBEWRAP(json_file_get_string_vec), &
104+ MAYBEWRAP(json_file_get_alloc_string_vec), &
104105 json_file_get_root
105106
106107 generic,public :: update = > MAYBEWRAP(json_file_update_integer), &
@@ -140,6 +141,7 @@ module json_file_module
140141 procedure :: MAYBEWRAP(json_file_get_double_vec)
141142 procedure :: MAYBEWRAP(json_file_get_logical_vec)
142143 procedure :: MAYBEWRAP(json_file_get_string_vec)
144+ procedure :: MAYBEWRAP(json_file_get_alloc_string_vec)
143145 procedure :: json_file_get_root
144146
145147 ! update:
@@ -1120,6 +1122,52 @@ subroutine wrap_json_file_get_string_vec(me, path, vec, found)
11201122 end subroutine wrap_json_file_get_string_vec
11211123! *****************************************************************************************
11221124
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+
11231171! *****************************************************************************************
11241172! > author: Jacob Williams
11251173! date:1/10/2015
0 commit comments