Skip to main content

decode_json_string_token

Function decode_json_string_token 

Source
pub fn decode_json_string_token(tok: &str) -> Option<String>
Expand description

A JSON string TOKEN — quotes included — decoded. None when tok is not a quoted string (a number, true, an object, …): C’s jlif string callback is simply not the one yajl calls for those.

This is the ONE place a .db JSON string is turned into text. Every site that used to strip the quotes by hand went through the escapes untranslated.

The token is DOUBLE-quoted, always. The dialect’s single-quoted spelling (yajl_lex.c:695-699) is rewritten by epics_base_rs::json5, which owns every dialect form; accepting it a second time here would put two owners back on the same grammar.