decode_rfc6901 Function

public pure function decode_rfc6901(str) result(str_out)

Decode a string from the “JSON Pointer” RFC 6901 format.

It replaces ~1 with / and ~0 with ~.

Arguments

Type IntentOptional AttributesName
character(kind=CK,len=*), intent(in) :: str

Return Value character(kind=CK,len=:), allocatable


Calls

proc~~decode_rfc6901~~CallsGraph proc~decode_rfc6901 decode_rfc6901 proc~replace_string replace_string proc~decode_rfc6901->proc~replace_string

Called by

proc~~decode_rfc6901~~CalledByGraph proc~decode_rfc6901 decode_rfc6901 proc~json_get_by_path_rfc6901 json_get_by_path_rfc6901 proc~json_get_by_path_rfc6901->proc~decode_rfc6901

Contents

Source Code


Source Code

    pure function decode_rfc6901(str) result(str_out)

    implicit none

    character(kind=CK,len=*),intent(in) :: str
    character(kind=CK,len=:),allocatable :: str_out

    str_out = str

    call replace_string(str_out,tilde//CK_'1',slash)
    call replace_string(str_out,tilde//CK_'0',tilde)

    end function decode_rfc6901