Skip to content

Commit 382b79b

Browse files
committed
fixed string writing issue.
1 parent 0ac5eaf commit 382b79b

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/json_example.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ subroutine test_4()
223223
write(*,*) ''
224224
!write it to a string, and print to console:
225225
call json_print_to_string(p, string)
226-
write(*,*) string
226+
write(*,'(A)') string
227227
deallocate(string) !cleanup
228228

229229
!cleanup:

src/json_module.f90

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,11 +1808,8 @@ subroutine json_value_to_string(me,str)
18081808
! DESCRIPTION
18091809
! Print the JSON structure to an allocatable string.
18101810
!
1811-
! WARNING: this routine seems to be introducing random line
1812-
! breaks to the string. Haven't figured out why yet...
1813-
!
18141811
! AUTHOR
1815-
! Jacob Williams : 2/12/2014
1812+
! Jacob Williams : 2/13/2014
18161813
!
18171814
!********************************************************************************
18181815
implicit none

0 commit comments

Comments
 (0)