Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: always sort JSON encoded keys #318

Merged
merged 6 commits into from
Jan 16, 2022
Merged

fix: always sort JSON encoded keys #318

merged 6 commits into from
Jan 16, 2022

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Jan 16, 2022

New Pull Request Checklist

Issue Description

When using the SDK encoders, the keys are not required to be sorted. Since a JSON encoded string is sometimes used a keys or compared directly internally, it can lead to matches not found when saving ParseObject's that have children ParseObect's.

This is also the reason why multiple tests are disabled for Linux and Windows.

Related issue: #n/a

Approach

Make all SDK encoders sort keys.

TODOs before merging

  • Modified tests for changes
  • Enabled 110+ more tests for Linux & Windows
  • Add entry to changelog

@parse-github-assistant
Copy link

parse-github-assistant bot commented Jan 16, 2022

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@codecov
Copy link

codecov bot commented Jan 16, 2022

Codecov Report

Merging #318 (f4fb9b7) into main (b2a0d9c) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #318      +/-   ##
==========================================
+ Coverage   84.66%   84.70%   +0.04%     
==========================================
  Files         114      114              
  Lines       11845    11850       +5     
==========================================
+ Hits        10028    10037       +9     
+ Misses       1817     1813       -4     
Impacted Files Coverage Δ
Sources/ParseSwift/Coding/ParseCoding.swift 88.15% <100.00%> (+0.15%) ⬆️
Sources/ParseSwift/Coding/ParseEncoder.swift 74.35% <100.00%> (+0.12%) ⬆️
Sources/ParseSwift/LiveQuery/ParseLiveQuery.swift 73.66% <0.00%> (+0.14%) ⬆️
Sources/ParseSwift/Objects/ParseObject.swift 81.94% <0.00%> (+0.47%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2a0d9c...f4fb9b7. Read the comment docs.

@cbaker6 cbaker6 merged commit e6457a4 into parse-community:main Jan 16, 2022
@cbaker6 cbaker6 deleted the fixPointers branch January 16, 2022 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant