解析json字符串错误
- Dominant language
- Swift
- Stars
- 4.3k
- Forks
- 677
- PR merge metrics
- No merged PRs in 30d
Description
当解析一个Json字符串的时候,其中某个Key的值为另一个Json字符串时,字符串的内容会被解析成prettyPrinted的字符串,Json字符串中的 冒号会被转义成等号。导致这个Key值下面的Json字符串在解析的时候不成功
以下的data类型 为String的时候,userSig后面的冒号会被转义成等号
`"{\"code\":200,\"data\":{\"usersig\":\"eJyrVgrxCdZLrSjILEpVsjI0Nbe0NDYxMrHQAYuXpRYpWSkZ6RkoQfjFKdmJBQWZKUCVJgYGRmaWFqaWEJnMlNS8ksy0TLAGCxMLc5iOzHSgQF6YRX5oll+AmVeVcXGIaURygH9Ylb+PWVVJQFJOYalJXnqUV7ZBWphpqYEtVGNJZi7EQeZA9wAdVAsAKzQxKQ==\"},\"message\":\"success\"}"`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the nested JSON-string example in the issue with HandyJSON's parsing entry points, then trace where the nested value is converted into a pretty-printed string. Done means the nested JSON remains valid, its colon is not changed to an equals sign, and the example parses successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100