escape_json_string Function

public pure function escape_json_string(s) result(escaped)

Escape a string for safe JSON embedding. Handles: " -> \", \ -> \, and control characters.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: s

Return Value character(len=:), allocatable