json_file_print_to_string Subroutine

private subroutine json_file_print_to_string(me, str)

Print the JSON file to a string.

Example

Open a JSON file, and then print the contents to a string:

     type(json_file) :: f
     character(kind=CK,len=:),allocatable :: str
     call f%load('my_file.json')
     call f%serialize(str)

Arguments

TypeIntentOptionalAttributesName
class(json_file), intent(inout) :: me
character(kind=CK,len=:), intent(out), allocatable:: str

string to print JSON data to


Contents


Source Code

    subroutine json_file_print_to_string(me,str)

    implicit none

    class(json_file),intent(inout)                   :: me
    character(kind=CK,len=:),allocatable,intent(out) :: str  !! string to print JSON data to

    call me%core%serialize(me%p,str)

    end subroutine json_file_print_to_string