Minimal JSON string escaping: backslash, double-quote, and the
common control characters. Doc/name/units strings in this
codebase are plain single-line ASCII, so this is deliberately
not a general-purpose escaper.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Where possible, edges connecting nodes are
given different colours to make them easier to distinguish in
large graphs.
Variables
Type
Visibility
Attributes
Name
Initial
character(len=1),
private
::
c
integer,
private
::
i
Source Code
pure function json_escape(s)result(out)!! Minimal JSON string escaping: backslash, double-quote, and the!! common control characters. Doc/name/units strings in this!! codebase are plain single-line ASCII, so this is deliberately!! not a general-purpose escaper.character(len=*),intent(in)::scharacter(len=:),allocatable::outinteger::icharacter::cout=""do i=1,len(s)c=s(i:i)select case(c)case('"')out=out//'\"'case("\") out = out//"\\" case (achar(10)) out = out//"\n" case (achar(9)) out = out//"\t"case defaultif(iachar(c)>=32)out=out//cend select end do end function json_escape