@@ -8763,8 +8763,14 @@ subroutine json_get_real64_by_path(json, me, path, value, found, default)
8763
8763
real (real64),intent (in ),optional :: default ! ! default value if not found
8764
8764
8765
8765
real (RK) :: tmp
8766
+ real (RK) :: tmp_default
8766
8767
8767
- call json% get(me, path, tmp, found, default)
8768
+ if (present (default)) then
8769
+ tmp_default = real (default, RK)
8770
+ call json% get(me, path, tmp, found, tmp_default)
8771
+ else
8772
+ call json% get(me, path, tmp, found)
8773
+ end if
8768
8774
value = real (tmp,real64)
8769
8775
8770
8776
end subroutine json_get_real64_by_path
@@ -8826,8 +8832,14 @@ subroutine json_get_real64_vec_by_path(json, me, path, vec, found, default)
8826
8832
real (real64),dimension (:),intent (in ),optional :: default ! ! default value if not found
8827
8833
8828
8834
real (RK),dimension (:),allocatable :: tmp
8835
+ real (RK),dimension (:),allocatable :: tmp_default
8829
8836
8830
- call json% get(me, path, tmp, found, default)
8837
+ if (present (default)) then
8838
+ tmp_default = real (default, RK)
8839
+ call json% get(me, path, tmp, found, tmp_default)
8840
+ else
8841
+ call json% get(me, path, tmp, found)
8842
+ end if
8831
8843
if (allocated (tmp)) vec = real (tmp,real64)
8832
8844
8833
8845
end subroutine json_get_real64_vec_by_path
0 commit comments