@@ -3,7 +3,7 @@ module vertex_m
33 ! ! version: v1.0
44 ! ! date: 2020-Nov-30
55 ! ! license: Copyright (c) 2020-2021, Sourcery Institute, BSD 3-clause license Copyright (c) 2018 Jacob Williams
6- use jsonff, only : json_object_t
6+ use jsonff, only : json_element_t, json_object_t, json_value_t
77 use iso_varying_string, only : varying_string, len
88
99 implicit none
@@ -38,13 +38,19 @@ module vertex_m
3838 end type vertex_t
3939
4040 interface vertex_t
41-
42- module function from_json (json_object ) result(vertex)
41+
42+ impure elemental module function from_json_element(json_element) result(vertex)
43+ implicit none
44+ type (json_element_t), intent (in ) :: json_element
45+ type (vertex_t) :: vertex
46+ end function
47+
48+ module function from_json_value (json_value ) result(vertex)
4349 implicit none
44- type (json_object_t ), intent (in ) :: json_object
50+ class(json_value_t ), intent (in ) :: json_value
4551 type (vertex_t) :: vertex
4652 end function
47-
53+
4854 pure module function construct_from_components(identifier, edges, label, attributes) result(vertex)
4955 implicit none
5056 integer , intent (in ) :: identifier
@@ -53,11 +59,17 @@ pure module function construct_from_components(identifier, edges, label, attribu
5359 type (varying_string), intent (in ), optional :: attributes
5460 type (vertex_t) vertex
5561 end function
56-
62+
5763 end interface
5864
5965 interface
6066
67+ module function from_json_object (json_object ) result(vertex)
68+ implicit none
69+ type (json_object_t), intent (in ) :: json_object
70+ type (vertex_t) :: vertex
71+ end function
72+
6173 module subroutine set_edge_vector (self ,edges )
6274 ! ! Define the vertices on which this vertex depends on
6375 implicit none
0 commit comments