Repository navigation
fix issue #1178 - #1203
fix issue #1178#1203YanruiWang wants to merge 1 commit into
Conversation
SwiftyJSON#1178 for small float numbers, remove Small trailing digits when print them
There was a problem hiding this comment.
Vertical Whitespace Violation: Limit vertical whitespace to a single empty line. Currently 2. (vertical_whitespace)
| XCTAssertTrue(json.floatValue == 54321.12345) | ||
| XCTAssertEqual(json.numberValue, 54321.12345) | ||
| XCTAssertEqual(json.stringValue, "54321.12345") | ||
|
|
There was a problem hiding this comment.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
| } | ||
| return "" | ||
|
|
||
|
|
There was a problem hiding this comment.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
Vertical Whitespace Violation: Limit vertical whitespace to a single empty line. Currently 2. (vertical_whitespace)
| return rawNumber.stringValue | ||
| } | ||
| return "" | ||
|
|
There was a problem hiding this comment.
Trailing Whitespace Violation: Lines should not have trailing whitespace. (trailing_whitespace)
There was a problem hiding this comment.
Identifier Name Violation: Variable name should be between 3 and 40 characters long: 'n' (identifier_name)

#1178
for small float numbers, remove Small trailing digits when print them
The PR should summarize what was changed and why. Here are some questions to
help you if you're not sure:
What behavior was changed?
Correctly print number
8.8What code was refactored / updated to support this change?
**
SwiftyJSON.swiftline 788What issues are related to this PR? Or why was this change introduced?
issue Parsing double error, eg: 8.8 be convert to 8.8000000000000007 #1178
Checklist - While not every PR needs it, new features should consider this list:
[ X] Does this have tests?
Does this have documentation?
Does this break the public API (Requires major version bump)?
Is this a new feature (Requires minor version bump)?