Skip to content

Commit b6fba4d

Browse files
committed
updating the comments
1 parent f84e9fe commit b6fba4d

File tree

1 file changed

+41
-4
lines changed

1 file changed

+41
-4
lines changed

src/json_module.f90

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,11 @@ module json_module
193193
!
194194
! EXAMPLE
195195
! type(json_file) :: json
196-
! call json%load_file(filename)
196+
! integer :: ival
197+
! real(wp) :: rval
198+
! character(len=:),allocatable :: cval
199+
! logical :: found
200+
! call json%load_file(filename='myfile.json')
197201
! call json%print_file()
198202
! call json%get('var.i',ival,found)
199203
! call json%get('var.d',rval,found)
@@ -254,20 +258,52 @@ subroutine array_callback_func(element, i, count)
254258
integer,intent(in) :: count !size of array
255259
end subroutine array_callback_func
256260
end interface
257-
261+
262+
!*************************************************************************************
263+
!****f* json_module/json_value_get
264+
!
265+
! NAME
266+
! json_value_get
267+
!
268+
! DESCRIPTION
269+
! Get a child, either by index or name string.
270+
!
271+
! SOURCE
258272
interface json_value_get !consider renaming this json_value_get_child
259273
module procedure get_by_index
260274
module procedure get_by_name_chars
261275
end interface json_value_get
262-
276+
!*************************************************************************************
277+
278+
!*************************************************************************************
279+
!****f* json_module/json_value_add
280+
!
281+
! NAME
282+
! json_value_add
283+
!
284+
! DESCRIPTION
285+
! Add objects to a linked list of json_values.
286+
!
287+
! SOURCE
263288
interface json_value_add
264289
module procedure :: json_value_add_member
265290
module procedure :: json_value_add_integer, json_value_add_integer_vec
266291
module procedure :: json_value_add_real, json_value_add_real_vec
267292
module procedure :: json_value_add_logical, json_value_add_logical_vec
268293
module procedure :: json_value_add_string, json_value_add_string_vec
269294
end interface json_value_add
295+
!*************************************************************************************
270296

297+
!*************************************************************************************
298+
!****f* json_module/json_get
299+
!
300+
! NAME
301+
! json_get
302+
!
303+
! DESCRIPTION
304+
! Get data from a json_value linked list.
305+
!
306+
! SOURCE
271307
interface json_get
272308
module procedure :: json_get_by_path
273309
module procedure :: json_get_integer, json_get_integer_vec
@@ -276,6 +312,7 @@ end subroutine array_callback_func
276312
module procedure :: json_get_chars, json_get_char_vec
277313
module procedure :: json_get_array
278314
end interface json_get
315+
!*************************************************************************************
279316

280317
interface json_print_to_string
281318
module procedure :: json_value_to_string
@@ -1135,7 +1172,7 @@ end subroutine json_value_remove
11351172
! json_value_add_member
11361173
!
11371174
! DESCRIPTION
1138-
! Adds the member to the linked list
1175+
! Adds the member as a child of this.
11391176
!
11401177
! SOURCE
11411178

0 commit comments

Comments
 (0)