Skip to content

fix: Custom JSON encoder for List and Map doesn't work correctly in full mode #789

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

Merged
merged 9 commits into from
Nov 15, 2022
Merged

Conversation

mbfakourii
Copy link
Member

@mbfakourii mbfakourii commented Sep 16, 2022

New Pull Request Checklist

Issue Description

Solve the parseEncode problem in list and map
and test added
Related issue: #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

fix full json data for parseEncode
@parse-github-assistant
Copy link

parse-github-assistant bot commented Sep 16, 2022

Thanks for opening this pull request!

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

@mtrezza mtrezza linked an issue Sep 16, 2022 that may be closed by this pull request
4 tasks
@codecov
Copy link

codecov bot commented Sep 16, 2022

Codecov Report

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

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%) ⬆️
packages/dart/lib/src/network/options.dart 0.00% <0.00%> (-50.00%) ⬇️
...ackages/dart/lib/src/network/parse_live_query.dart 0.00% <0.00%> (-0.92%) ⬇️
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.

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

@mtrezza mtrezza requested a review from a team September 16, 2022 18:44
@mtrezza
Copy link
Member

mtrezza commented Sep 16, 2022

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.

@mbfakourii mbfakourii changed the title fix: full value in list and map in parseEncode fix: Custom json encoder for List and Map Sep 16, 2022
@parse-github-assistant
Copy link

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

@parse-github-assistant parse-github-assistant bot changed the title fix: Custom json encoder for List and Map fix: custom json encoder for List and Map Sep 16, 2022
@mtrezza mtrezza changed the title fix: custom json encoder for List and Map fix: custom json encoder for List and Map doesn't work correctly in full mode Sep 16, 2022
Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@mbfakourii
Copy link
Member Author

mbfakourii commented Oct 27, 2022

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

test added

@mtrezza mtrezza requested review from a team and removed request for a team October 27, 2022 12:02
Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@mbfakourii
Copy link
Member Author

mbfakourii commented Oct 28, 2022

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

@mtrezza
Copy link
Member

mtrezza commented Oct 29, 2022

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

@mtrezza mtrezza changed the title fix: custom json encoder for List and Map doesn't work correctly in full mode fix: Custom JSON encoder for List and Map doesn't work correctly in full mode Nov 11, 2022
@mtrezza
Copy link
Member

mtrezza commented Nov 11, 2022

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)

Changes were added in file changelog
Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@mtrezza mtrezza merged commit 7fb7ce6 into parse-community:master Nov 15, 2022
@mbfakourii mbfakourii deleted the patch-2 branch May 23, 2023 11:40
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.

include object in toJson not work
2 participants