clean_json_string: Remove JSON From Multi-annotations

View source: R/string-cleaning-utils.R

clean_json_stringR Documentation

Remove JSON From Multi-annotations

Description

Remove the JSON-specific elements from a string. For example, a JSON string could look like ⁠"[\"foo\", \"bar\"]"⁠. This function would return the string "foo, bar".

Usage

clean_json_string(json_string, remove_spaces = FALSE)

Arguments

json_string

Character string with JSON elements.

remove_spaces

TRUE to also remove spaces, else FALSE. Note that this will remove all spaces. Default is FALSE.

Value

Character string without brackets, escaped quotes, and (optionally) spaces.


Sage-Bionetworks/cleanAD documentation built on Dec. 9, 2024, 3:40 p.m.