json_file_print_to_string Subroutine

private subroutine json_file_print_to_string(me, str)

Arguments

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

string to print JSON data to

Description

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_file('my_file.json')
     call f%print_file(str)

Calls

proc~~json_file_print_to_string~~CallsGraph proc~json_file_print_to_string json_file_print_to_string proc~json_value_to_string json_value_to_string proc~json_file_print_to_string->proc~json_value_to_string proc~json_value_print json_value_print proc~json_value_to_string->proc~json_value_print proc~json_value_print->proc~json_value_print interface~throw_exception throw_exception proc~json_value_print->interface~throw_exception proc~real_to_string real_to_string proc~json_value_print->proc~real_to_string proc~json_count json_count proc~json_value_print->proc~json_count proc~integer_to_string integer_to_string proc~json_value_print->proc~integer_to_string none~write_it write_it proc~json_value_print->none~write_it proc~json_throw_exception json_throw_exception interface~throw_exception->proc~json_throw_exception proc~compact_real_string compact_real_string proc~real_to_string->proc~compact_real_string
Help

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 json_value_to_string(me%p,str)

    end subroutine json_file_print_to_string