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

Support projection options to handle un defined nilable properties #4

Merged
merged 13 commits into from
Apr 3, 2024

Conversation

prakanth97
Copy link
Contributor

@prakanth97 prakanth97 commented Mar 28, 2024

Purpose

Fixes: ballerina-platform/ballerina-library#6251

Examples

Checklist

  • Linked to an issue
  • Updated the changelog
  • Added tests
  • Updated the spec
  • Checked native-image compatibility

@CLAassistant
Copy link

CLAassistant commented Mar 28, 2024

CLA assistant check
All committers have signed the CLA.

@prakanth97 prakanth97 marked this pull request as ready for review March 28, 2024 07:52
Copy link

codecov bot commented Mar 28, 2024

Codecov Report

Attention: Patch coverage is 79.89130% with 37 lines in your changes are missing coverage. Please review.

Project coverage is 76.64%. Comparing base (b0d3dfe) to head (ee6801c).

Files Patch % Lines
.../ballerina/lib/data/jsondata/json/JsonCreator.java 76.28% 11 Missing and 12 partials ⚠️
.../data/jsondata/compiler/JsondataTypeValidator.java 70.00% 2 Missing and 4 partials ⚠️
...o/ballerina/lib/data/jsondata/json/JsonParser.java 86.48% 4 Missing and 1 partial ⚠️
...ava/io/ballerina/lib/data/jsondata/FromString.java 33.33% 1 Missing and 1 partial ⚠️
...ballerina/lib/data/jsondata/json/JsonTraverse.java 95.65% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main       #4      +/-   ##
============================================
- Coverage     77.40%   76.64%   -0.77%     
- Complexity      208      286      +78     
============================================
  Files            18       23       +5     
  Lines          1341     1627     +286     
  Branches        243      307      +64     
============================================
+ Hits           1038     1247     +209     
- Misses          217      256      +39     
- Partials         86      124      +38     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -62,9 +62,10 @@ public isolated function toJson(anydata v)
# Represent the options that can be used to modify the behaviour of the projection.
#
# + allowDataProjection - enable or disable projection
Copy link
Contributor

Choose a reason for hiding this comment

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

Docs out of sync

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will update

ballerina/json_api.bal Outdated Show resolved Hide resolved
@hasithaa hasithaa merged commit 8b270c4 into ballerina-platform:main Apr 3, 2024
6 of 7 checks passed
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.

Support options for jsondata module to handle nil as optional field and absent of field as nilable type
5 participants