Get a json_value pointer to an object from a JSON file.
If the hash table has been enabled, then it will use that to get the pointer. Note that this only will work for the top-level variables, since the hash table only stores those. Otherwise, it will fall back to the normal method of getting the pointer.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(json_file), | intent(inout) | :: | me | |||
| character(kind=CK, len=*), | intent(in) | :: | path |
the path to the variable |
||
| type(json_value), | intent(out), | pointer | :: | p |
pointer to the variable |
|
| logical(kind=LK), | intent(out), | optional | :: | found |
if it was really found |
subroutine json_file_get_object(me, path, p, found) implicit none class(json_file),intent(inout) :: me character(kind=CK,len=*),intent(in) :: path !! the path to the variable type(json_value),pointer,intent(out) :: p !! pointer to the variable logical(LK),intent(out),optional :: found !! if it was really found if (me%hash_enabled) then call me%hash%get(path, p, found) ! if p is associated, then we know it was found (see hash_table_get) if (associated(p)) return end if ! if not using the hash table, or the key was not found, ! fall back to the normal method: call me%core%get(me%p, path, p, found) end subroutine json_file_get_object