Sample Input String:
{"14" Alloy Wheels (Set of 4)":"N/A","Engine":"CrDi","15" Alloy Wheels":"optional","Other":"16" Wheels"};
There are 4 possible cases:
{"key"here":
,"Key"here":
:"Value"here",
:"Value"here"}
I need to get rid of the inverted commas in between keys and values, which is causing
invalid json
when using json_decode
in PHP.
One possible solution is using RegEx, but I am not able to formulate the above possible cases.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…