Skip to content

Cohort json file contain non-standard symbols

Created by: marek05

Three cohort files contain some non-standard symbols which give me errors like:

Error in file(con, "r"): cannot open the connection 4: In grep("^:space:[[{]", content) : unable to translate '{ "cdmVersionRange" : ">=5.0.0", "PrimaryCriteria" : { "CriteriaList" : [ { "ConditionOccurrence" : { "CodesetId" : 4, "ConditionTypeExclude" : false } }, { "Measurement" : { "CodesetId" : 5, "MeasurementTyp...' to a wide string 5: In grep("^[[:space:]][[{]", content) : input string 1 is invalid

Affected are three files: 313.json When looking at the file as raw file: "[PIONEER 2.0]�Metastasis stage M1a" contains the symbol. Replacing the symbol with space was the solution. The same for 314.json "[PIONEER 2.0]�Metastasis stage M1b" 315.json "[PIONEER 2.0]�Metastasis stage M1c"