search for: json_quote

Displaying 1 result from an estimated 1 matches for "json_quote".

2014 Oct 10
4
[PATCH 1/3] Move JSON to mllib
...e Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + *) + +(* Poor man's JSON generator. *) + +open Printf + +open Common_utils + +type field = string * json_t +and json_t = String of string | Int of int +and doc = field list + +(* JSON quoting. *) +let json_quote str = + let str = replace_str str "\\" "\\\\" in + let str = replace_str str "\"" "\\\"" in + let str = replace_str str "'" "\\'" in + let str = replace_str str "\008" "\\b" in + let str = replace...