Skip to main content

resolve_references

Function resolve_references 

Source
pub fn resolve_references(
    json_str: &str,
    refs: &HashMap<String, String>,
) -> String
Expand description

Resolve XML reference placeholders in JSON string

Replaces placeholders like "<script001>" with the actual content from references map.

§Arguments

  • json_str - JSON string potentially containing reference placeholders
  • refs - Map of tag names to their content

§Returns

  • JSON string with all references resolved