Parse-SDK-Flutter icon indicating copy to clipboard operation
Parse-SDK-Flutter copied to clipboard

fix: custom json encoder for List and Map doesn't work correctly in `full` mode

Open mbfakourii opened this issue 3 years ago • 4 comments

New Pull Request Checklist

  • [x] I am not disclosing a vulnerability.
  • [x] I am creating this PR in reference to an issue.

Issue Description

Solve the parseEncode problem in list and map

Related issue: https://github.com/parse-community/Parse-SDK-Flutter/issues/788

Approach

The full: full was added for when we use the list and map in parseEncode and toJson

TODOs before merging

  • [ ] Add tests
  • [ ] Add changes to documentation (guides, repository pages, in-code descriptions)
  • [ ] A changelog entry

mbfakourii avatar Sep 16 '22 14:09 mbfakourii

Thanks for opening this pull request!

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

Codecov Report

Base: 10.26% // Head: 10.67% // Increases project coverage by +0.40% :tada:

Coverage data is based on head (a471393) compared to base (14be107). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #789      +/-   ##
==========================================
+ Coverage   10.26%   10.67%   +0.40%     
==========================================
  Files          49       47       -2     
  Lines        2815     2810       -5     
==========================================
+ Hits          289      300      +11     
+ Misses       2526     2510      -16     
Impacted Files Coverage Δ
packages/dart/lib/src/utils/parse_encoder.dart 56.66% <100.00%> (+20.00%) :arrow_up:
packages/dart/lib/src/network/options.dart 0.00% <0.00%> (-50.00%) :arrow_down:
...ackages/dart/lib/src/network/parse_live_query.dart 0.00% <0.00%> (-0.92%) :arrow_down:
packages/flutter/lib/parse_server_sdk.dart 8.77% <0.00%> (ø)
packages/dart/lib/src/objects/parse_file.dart 0.00% <0.00%> (ø)
packages/dart/lib/src/objects/parse_user.dart 0.00% <0.00%> (ø)
packages/dart/lib/src/objects/parse_file_web.dart 0.00% <0.00%> (ø)
packages/dart/lib/src/objects/parse_file_base.dart 0.00% <0.00%> (ø)
...ackages/dart/lib/src/network/parse_dio_client.dart 0.00% <0.00%> (ø)
...ckages/dart/lib/src/network/parse_http_client.dart 5.12% <0.00%> (ø)
... and 9 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Sep 16 '22 15:09 codecov[bot]

Could you please rephrase the PR title? It will become the changelog entry and a developer should be able to understand what this fixes without reading the PR.

mtrezza avatar Sep 16 '22 18:09 mtrezza

I will reformat the title to use the proper commit message syntax.

Could you add a test to demonstrate what is not working correctly?

test added

mbfakourii avatar Oct 27 '22 07:10 mbfakourii

There's still a lint issue, not sure what it is, because the logs don't show any specific message. Do you have any idea?

It is for Dart code format I committed, it is probably fixed

mbfakourii avatar Oct 28 '22 06:10 mbfakourii

Indeed, the tests pass, now we just need a review from @parse-community/flutter-sdk-review

mtrezza avatar Oct 29 '22 15:10 mtrezza

There has been no additional review, but I'll go ahead and merge it anyway; if there is an issue, we'll find out.

Could you please:

  1. Increment the dart version number (patch)
  2. Add a changelog entry to the dart changelog with the title of this PR:
### Bug Fixes:
- Custom JSON encoder for List and Map doesn't work correctly in `full` mode (#789)

mtrezza avatar Nov 11 '22 21:11 mtrezza