Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/jacobwilliams/json-fortran
Browse files Browse the repository at this point in the history
…into 546-example
  • Loading branch information
jacobwilliams committed May 25, 2024
2 parents e13e088 + fff5372 commit ccd709e
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.3.0
8.4.0
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- [Change Log](#change-log)
- [Unreleased](#unreleased)
- [8.4.0 (2024-03-06)](#840-2024-03-06)
- [8.3.0 (2022-05-07)](#830-2022-05-07)
- [8.2.5 (2021-08-17)](#825-2021-08-17)
- [8.2.4 (2021-08-15)](#824-2021-08-15)
Expand Down Expand Up @@ -45,7 +46,22 @@

### [Unreleased](https://github.com/jacobwilliams/json-fortran/tree/HEAD)

[Complete Changeset](https://github.com/jacobwilliams/json-fortran/compare/8.3.0...HEAD)
[Complete Changeset](https://github.com/jacobwilliams/json-fortran/compare/8.4.0...HEAD)

### [8.4.0](https://github.com/jacobwilliams/json-fortran/tree/8.4.0) (2024-03-06)

[Complete Changeset](https://github.com/jacobwilliams/json-fortran/compare/8.3.0...8.4.0)
or [Download v8.4.0](https://github.com/jacobwilliams/json-fortran/releases/tag/8.4.0)

**Enhancements:**

- Minor updates for readme and documentation [\#521](https://github.com/jacobwilliams/json-fortran/pull/521) ([zmoon](https://github.com/zmoon))
- Updates for unit tests [\#536](https://github.com/jacobwilliams/json-fortran/issues/536) [\#543](https://github.com/jacobwilliams/json-fortran/pull/543) ([gha3mi](https://github.com/gha3mi), [jacobwilliams](https://github.com/jacobwilliams))

**Bug Fixes:**

- Fixed a bug where the library would not compile if using `REAL128` kind [\#550](https://github.com/jacobwilliams/json-fortran/issues/550) ([jacobwilliams](https://github.com/jacobwilliams))
- Fixes to GitHub Actions CI [\#535](https://github.com/jacobwilliams/json-fortran/pull/535) ([jacobwilliams](https://github.com/jacobwilliams))

### [8.3.0](https://github.com/jacobwilliams/json-fortran/tree/8.3.0) (2022-05-07)

Expand All @@ -59,7 +75,6 @@ or [Download v8.3.0](https://github.com/jacobwilliams/json-fortran/releases/tag/
- Add information on conda-forge distribution [\#506](https://github.com/jacobwilliams/json-fortran/pull/506) ([awvwgk](https://github.com/awvwgk)) [\#507](https://github.com/jacobwilliams/json-fortran/issues/507)
- Updated CMake to export include directories with target [\#504](https://github.com/jacobwilliams/json-fortran/pull/504) [\#503](https://github.com/jacobwilliams/json-fortran/issues/503) ([awvwgk](https://github.com/awvwgk))


**Bug Fixes:**

- Fixed a minor standards violation [\#510](https://github.com/jacobwilliams/json-fortran/issues/510) [\#511](https://github.com/jacobwilliams/json-fortran/pull/511) ([jacobwilliams](https://github.com/jacobwilliams))
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ cmake_minimum_required ( VERSION 2.8.8 FATAL_ERROR )
enable_language ( Fortran )
project ( jf_test NONE )
find_package ( jsonfortran-${CMAKE_Fortran_COMPILER_ID} 8.3.0 REQUIRED )
find_package ( jsonfortran-${CMAKE_Fortran_COMPILER_ID} 8.4.0 REQUIRED )
file ( GLOB JF_TEST_SRCS "src/tests/jf_test_*.F90" )
foreach ( UNIT_TEST ${JF_TEST_SRCS} )
Expand Down
5 changes: 3 additions & 2 deletions json-fortran.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ coloured_edges: true
extra_filetypes: .inc !
print_creation_date: true
creation_date: %Y-%m-%d %H:%M %z
extra_mods: iso_fortran_env:https://gcc.gnu.org/onlinedocs/gfortran/ISO_005fFORTRAN_005fENV.html
ifcore:https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-tracebackqq
extra_mods: iso_fortran_env:https://fortranwiki.org/fortran/show/iso_fortran_env
ifcore:https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2024-0/tracebackqq.html
ieee_arithmetic:https://fortranwiki.org/fortran/show/ieee_arithmetic
md_extensions: markdown.extensions.toc
markdown.extensions.smarty
---
Expand Down
2 changes: 1 addition & 1 deletion pages/development-resources/release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ remain accurate.
1. Add `pages/releases/index.md` to the git index: `git add pages/releases/index.md`
1. Update the version string in remaining files requiring manual edits:
1. Edit the `.VERSION` file
1. Edit the CMake example on line 142 of `README.md`
1. Edit the CMake example on line 141 of `README.md`
1. Edit the `json_fortran_version` string in `json_module.F90`
1. Add these files to the git index: `git add .VERSION README.md ./src/json_module.F90`
1. Commit the changes to the master branch: `git commit`
Expand Down
3 changes: 3 additions & 0 deletions pages/releases/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ documentation from the documentation for official releases other than
using the browser's back button. Feel free to bookmark this page, or
the [main project page](|url|/index.html) for convenient navigation.

* [8.4.0](https://jacobwilliams.github.io/json-fortran/prev/8.4.0/index.html)
([FORD](https://github.com/Fortran-FOSS-Programmers/ford) generated documentation)
- [Download](https://github.com/jacobwilliams/json-fortran/releases/tag/8.4.0)
* [8.3.0](https://jacobwilliams.github.io/json-fortran/prev/8.3.0/index.html)
([FORD](https://github.com/Fortran-FOSS-Programmers/ford) generated documentation)
- [Download](https://github.com/jacobwilliams/json-fortran/releases/tag/8.3.0)
Expand Down
2 changes: 1 addition & 1 deletion src/json_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module json_module

implicit none

character(kind=json_CK,len=*),parameter,private :: version = '8.3.0'
character(kind=json_CK,len=*),parameter,private :: version = '8.4.0'
!! JSON-Fortran version.
!!
!!@note This string should match the one in the `.VERSION` file (which is used
Expand Down
10 changes: 5 additions & 5 deletions src/json_string_utilities.F90
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ subroutine string_to_integer(str,ival,status_ok)
! Compute how many digits we need to read
ndigits = 2*len_trim(str)
if (ndigits/=0) then
ndigits_digits = floor(log10(real(ndigits)))+1
ndigits_digits = nint(log10(real(ndigits)))+1
allocate(character(kind=CDK,len=ndigits_digits) :: digits)
write(digits,'(I0)') ndigits !gfortran will have a runtime error with * edit descriptor here
! gfortran bug: '*' edit descriptor for ISO_10646 strings does bad stuff.
Expand Down Expand Up @@ -484,9 +484,9 @@ subroutine unescape_string(str, error_message)

implicit none

character(kind=CK,len=:),allocatable,intent(inout) :: str !! in: string as stored
!! in a [[json_value]].
!! out: decoded string.
character(kind=CK,len=:),allocatable,intent(inout) :: str !! * in: string as stored
!! in a [[json_value]].
!! * out: decoded string.
character(kind=CK,len=:),allocatable,intent(out) :: error_message !! will be allocated if
!! there was an error

Expand Down Expand Up @@ -617,7 +617,7 @@ end subroutine unescape_string

!*****************************************************************************************
!> author: Jacob Williams
! date:6/14/2014
! date: 6/14/2014
!
! Returns true if the string is a valid 4-digit hex string.
!
Expand Down
16 changes: 14 additions & 2 deletions src/json_value_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8763,8 +8763,14 @@ subroutine json_get_real64_by_path(json, me, path, value, found, default)
real(real64),intent(in),optional :: default !! default value if not found

real(RK) :: tmp
real(RK) :: tmp_default

call json%get(me, path, tmp, found, default)
if (present(default)) then
tmp_default = real(default, RK)
call json%get(me, path, tmp, found, tmp_default)
else
call json%get(me, path, tmp, found)
end if
value = real(tmp,real64)

end subroutine json_get_real64_by_path
Expand Down Expand Up @@ -8826,8 +8832,14 @@ subroutine json_get_real64_vec_by_path(json, me, path, vec, found, default)
real(real64),dimension(:),intent(in),optional :: default !! default value if not found

real(RK),dimension(:),allocatable :: tmp
real(RK),dimension(:),allocatable :: tmp_default

call json%get(me, path, tmp, found, default)
if (present(default)) then
tmp_default = real(default, RK)
call json%get(me, path, tmp, found, tmp_default)
else
call json%get(me, path, tmp, found)
end if
if (allocated(tmp)) vec = real(tmp,real64)

end subroutine json_get_real64_vec_by_path
Expand Down

0 comments on commit ccd709e

Please sign in to comment.