Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次のように、TouchXMLを使用してキーが引用符で囲まれていないjsonを解析する方法はありますか?
{ foo:"bar" }
Webサービス(google)からの応答を解析しようとしているので、JSONコードを有効に修正するだけでは選択肢がありません。
それが不可能な場合、前処理ステップとしてキーを効率的に引用する方法はありますか?
RegexKitLiteで事前解析することにしました。
uint numReplace = [encoded replaceOccurrencesOfRegex:@"(?<=[\\{,])[^:\\[\\{\"]+(?=:)" withString:@"\"$0\""];