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

[Expression] Add merge prebuilt function for merging JSON object #2361

Merged
merged 10 commits into from
Jun 23, 2020

Conversation

cosmicshuai
Copy link
Contributor

@cosmicshuai cosmicshuai commented Jun 16, 2020

closes: #2468

Parity of botbuilder-dotnet PR:
microsoft/botbuilder-dotnet#4075

merge function can take JSON object as input.
merge(jobject1, jobject2, ...)

for example:

json1 = @"{
'FirstName': 'John',
'LastName': 'Smith',
'Enabled': false,
'Roles': [ 'User' ]
}"
json2 =@"{
'Enabled': true,
'Roles': [ 'User', 'Admin' ]
}"
string(merge(json(json1), json(json2))) will return

{"FirstName":"John","LastName":"Smith","Enabled":true,"Roles":["User","Admin"]}

@coveralls
Copy link

coveralls commented Jun 16, 2020

Pull Request Test Coverage Report for Build 140201

  • 7 of 7 (100.0%) changed or added relevant lines in 2 files are covered.
  • 9 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.07%) to 80.888%

Files with Coverage Reduction New Missed Lines %
libraries/botframework-streaming/src/webSocket/webSocketTransport.ts 2 80.65%
libraries/botframework-streaming/src/webSocket/webSocketServer.ts 7 66.67%
Totals Coverage Status
Change from base Build 139946: -0.07%
Covered Lines: 12906
Relevant Lines: 15236

💛 - Coveralls

@chrimc62
Copy link
Contributor

To many extra lines and remove tODO


Refers to: libraries/adaptive-expressions/src/expressionType.ts:161 in 4a11550. [](commit_id = 4a11550, deletion_comment = False)

Copy link
Contributor

@chrimc62 chrimc62 left a comment

Choose a reason for hiding this comment

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

🕐

Copy link
Contributor

@chrimc62 chrimc62 left a comment

Choose a reason for hiding this comment

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

:shipit:

@cosmicshuai cosmicshuai merged commit a57fecf into master Jun 23, 2020
@cosmicshuai cosmicshuai deleted the shuwan/mergeFucntion branch June 23, 2020 02:13
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.

[PORT] [Expression] Add merge prebuilt function for merging JSON object
3 participants