@@ -4354,8 +4354,8 @@ end subroutine json_value_add_string_vec_val_ascii
4354
4354
!
4355
4355
!# History
4356
4356
! * JW : 1/4/2014 : Original routine removed.
4357
- ! Now using n_children variable.
4358
- ! Renamed from json_value_count.
4357
+ ! Now using ` n_children` variable.
4358
+ ! Renamed from ` json_value_count` .
4359
4359
4360
4360
function json_count(json,p) result(count)
4361
4361
@@ -4380,15 +4380,15 @@ end function json_count
4380
4380
! date: 10/16/2015
4381
4381
!
4382
4382
! Returns a pointer to the parent of a [[json_value]].
4383
- ! If there is no parent, then a null() pointer is returned.
4383
+ ! If there is no parent, then a ` null()` pointer is returned.
4384
4384
4385
4385
subroutine json_get_parent(json,p,parent)
4386
4386
4387
4387
implicit none
4388
4388
4389
4389
class(json_core),intent(inout) :: json
4390
4390
type(json_value),pointer,intent(in) :: p !! JSON object
4391
- type(json_value),pointer,intent(out) :: parent !! pointer to parent
4391
+ type(json_value),pointer,intent(out) :: parent !! pointer to ` parent`
4392
4392
4393
4393
if (associated(p)) then
4394
4394
parent => p%parent
@@ -4406,15 +4406,15 @@ end subroutine json_get_parent
4406
4406
! date: 10/31/2015
4407
4407
!
4408
4408
! Returns a pointer to the next of a [[json_value]].
4409
- ! If there is no next, then a null() pointer is returned.
4409
+ ! If there is no next, then a ` null()` pointer is returned.
4410
4410
4411
4411
subroutine json_get_next(json,p,next)
4412
4412
4413
4413
implicit none
4414
4414
4415
4415
class(json_core),intent(inout) :: json
4416
4416
type(json_value),pointer,intent(in) :: p !! JSON object
4417
- type(json_value),pointer,intent(out) :: next !! pointer to next
4417
+ type(json_value),pointer,intent(out) :: next !! pointer to ` next`
4418
4418
4419
4419
if (associated(p)) then
4420
4420
next => p%next
@@ -4432,15 +4432,15 @@ end subroutine json_get_next
4432
4432
! date: 10/31/2015
4433
4433
!
4434
4434
! Returns a pointer to the previous of a [[json_value]].
4435
- ! If there is no previous, then a null() pointer is returned.
4435
+ ! If there is no previous, then a ` null()` pointer is returned.
4436
4436
4437
4437
subroutine json_get_previous(json,p,previous)
4438
4438
4439
4439
implicit none
4440
4440
4441
4441
class(json_core),intent(inout) :: json
4442
4442
type(json_value),pointer,intent(in) :: p !! JSON object
4443
- type(json_value),pointer,intent(out) :: previous !! pointer to previous
4443
+ type(json_value),pointer,intent(out) :: previous !! pointer to ` previous`
4444
4444
4445
4445
if (associated(p)) then
4446
4446
previous => p%previous
@@ -4459,15 +4459,15 @@ end subroutine json_get_previous
4459
4459
!
4460
4460
! Returns a pointer to the tail of a [[json_value]]
4461
4461
! (the last child of an array of object).
4462
- ! If there is no tail, then a null() pointer is returned.
4462
+ ! If there is no tail, then a ` null()` pointer is returned.
4463
4463
4464
4464
subroutine json_get_tail(json,p,tail)
4465
4465
4466
4466
implicit none
4467
4467
4468
4468
class(json_core),intent(inout) :: json
4469
4469
type(json_value),pointer,intent(in) :: p !! JSON object
4470
- type(json_value),pointer,intent(out) :: tail !! pointer to tail
4470
+ type(json_value),pointer,intent(out) :: tail !! pointer to ` tail`
4471
4471
4472
4472
if (associated(p)) then
4473
4473
tail => p%tail
@@ -4491,6 +4491,8 @@ subroutine json_value_get_child_by_index(json, p, idx, child, found)
4491
4491
class(json_core),intent(inout) :: json
4492
4492
type(json_value),pointer,intent(in) :: p !! object or array JSON data
4493
4493
integer(IK),intent(in) :: idx !! index of the child
4494
+ !! (this is a 1-based Fortran
4495
+ !! style array index).
4494
4496
type(json_value),pointer :: child !! pointer to the child
4495
4497
logical(LK),intent(out),optional :: found !! true if the value was found
4496
4498
!! (if not present, an exception
@@ -4753,7 +4755,7 @@ end subroutine json_print_2
4753
4755
!
4754
4756
!# Notes
4755
4757
! * This is an internal routine called by the various wrapper routines.
4756
- ! * The reason the str argument is non-optional is because of a
4758
+ ! * The reason the ` str` argument is non-optional is because of a
4757
4759
! bug in v4.9 of the gfortran compiler.
4758
4760
4759
4761
recursive subroutine json_value_print(json,p,iunit,str,indent,&
@@ -5042,7 +5044,7 @@ end subroutine json_value_print
5042
5044
! It uses either of two methods:
5043
5045
!
5044
5046
! * The original JSON-Fortran defaults
5045
- ! * RFC 6901
5047
+ ! * [ RFC 6901](https://tools.ietf.org/html/rfc6901)
5046
5048
5047
5049
subroutine json_get_by_path(json, me, path, p, found)
5048
5050
@@ -5498,10 +5500,10 @@ end subroutine json_get_by_path_default
5498
5500
!
5499
5501
! Note that trailing whitespace significance and case sensitivity
5500
5502
! are user-specified. To fully conform to the RFC 6901 standard,
5501
- ! should probably set:
5503
+ ! should probably set (via `initialize`) :
5502
5504
!
5503
- ! * trailing_spaces_significant = .true. [this is not the default setting]
5504
- ! * case_sensitive_keys = .true. [this is the default setting]
5505
+ ! * ` trailing_spaces_significant` = .true. [this is not the default setting]
5506
+ ! * ` case_sensitive_keys` = .true. [this is the default setting]
5505
5507
!
5506
5508
!### Example
5507
5509
!
@@ -5521,6 +5523,9 @@ end subroutine json_get_by_path_default
5521
5523
!@note Not doing anything special about the `-` character to index an array.
5522
5524
! This is considered a normal error.
5523
5525
!
5526
+ !@note Unlike in the default path mode, the array indices here are 0-based
5527
+ ! (in accordance with the RFC 6901 standard)
5528
+ !
5524
5529
!@warning Not checking if the member that is referenced is unique.
5525
5530
! (according to the standard, evaluation of non-unique references
5526
5531
! should fail). Like [[json_get_by_path_default]], this one will just return
0 commit comments