module CCasingLinerChoke use SimulationVariables use json_module implicit none public contains subroutine CasingLinerChokeToJson(parent) type(json_value),pointer :: parent type(json_core) :: json type(json_value),pointer :: p ! 1. create new node call json%create_object(p,'CasingLinerChoke') ! 2. add member of data type to new node ! call StringConfigurationToJson(p) ! call FormationToJson(p) call json%add(p,"CasingDepth",data%Configuration%CasingLinerChoke%CasingDepth) call json%add(p,"CasingId",data%Configuration%CasingLinerChoke%CasingId) call json%add(p,"CasingOd",data%Configuration%CasingLinerChoke%CasingOd) call json%add(p,"CasingWeight",data%Configuration%CasingLinerChoke%CasingWeight) call json%add(p,"CasingCollapsePressure",data%Configuration%CasingLinerChoke%CasingCollapsePressure) call json%add(p,"CasingTensileStrength",data%Configuration%CasingLinerChoke%CasingTensileStrength) call json%add(p,"LinerTopDepth",data%Configuration%CasingLinerChoke%LinerTopDepth) call json%add(p,"LinerLength",data%Configuration%CasingLinerChoke%LinerLength) call json%add(p,"LinerId",data%Configuration%CasingLinerChoke%LinerId) call json%add(p,"LinerOd",data%Configuration%CasingLinerChoke%LinerOd) call json%add(p,"LinerWeight",data%Configuration%CasingLinerChoke%LinerWeight) call json%add(p,"LinerCollapsePressure",data%Configuration%CasingLinerChoke%LinerCollapsePressure) call json%add(p,"LinerTensileStrength",data%Configuration%CasingLinerChoke%LinerTensileStrength) call json%add(p,"OpenHoleId",data%Configuration%CasingLinerChoke%OpenHoleId) call json%add(p,"OpenHoleLength",data%Configuration%CasingLinerChoke%OpenHoleLength) ! 3. add new node to parent call json%add(parent,p) end subroutine subroutine CasingLinerChokeFromJson(parent) use json_module,IK =>json_ik type(json_value),pointer :: parent type(json_core) :: json type(json_value),pointer :: p,pitems,pitem,pval,pbit call json%get(parent,'CasingLinerChoke',p) call json%get(p,"CasingDepth",pitem) call json%get(pitem,data%Configuration%CasingLinerChoke%CasingDepth) call json%get(p,"CasingId",pitem) call json%get(pitem,data%Configuration%CasingLinerChoke%CasingId) call json%get(p,"CasingOd",pitem) call json%get(pitem,data%Configuration%CasingLinerChoke%CasingOd) call json%get(p,"CasingWeight",pitem) call json%get(pitem,data%Configuration%CasingLinerChoke%CasingWeight) call json%get(p,"CasingCollapsePressure",pitem) call json%get(pitem,data%Configuration%CasingLinerChoke%CasingCollapsePressure) call json%get(p,"CasingTensileStrength",pitem) call json%get(pitem,data%Configuration%CasingLinerChoke%CasingTensileStrength) call json%get(p,"LinerTopDepth",pitem) call json%get(pitem,data%Configuration%CasingLinerChoke%LinerTopDepth) call json%get(p,"LinerLength",pitem) call json%get(pitem,data%Configuration%CasingLinerChoke%LinerLength) call json%get(p,"LinerId",pitem) call json%get(pitem,data%Configuration%CasingLinerChoke%LinerId) call json%get(p,"LinerOd",pitem) call json%get(pitem,data%Configuration%CasingLinerChoke%LinerOd) call json%get(p,"LinerWeight",pitem) call json%get(pitem,data%Configuration%CasingLinerChoke%LinerWeight) call json%get(p,"LinerCollapsePressure",pitem) call json%get(pitem,data%Configuration%CasingLinerChoke%LinerCollapsePressure) call json%get(p,"LinerTensileStrength",pitem) call json%get(pitem,data%Configuration%CasingLinerChoke%LinerTensileStrength) call json%get(p,"OpenHoleId",pitem) call json%get(pitem,data%Configuration%CasingLinerChoke%OpenHoleId) call json%get(p,"OpenHoleLength",pitem) call json%get(pitem,data%Configuration%CasingLinerChoke%OpenHoleLength) end subroutine end module CCasingLinerChoke