[PR #993] [MERGED] Update JSONPathMatcher.cs to cover the string path selection to a child #1182

Closed
opened 2025-12-29 09:18:48 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/wiremock/WireMock.Net/pull/993
Author: @DayLightDancer
Created: 8/15/2023
Status: Merged
Merged: 8/17/2023
Merged by: @StefH

Base: masterHead: master


📝 Commits (6)

  • 7924d0a Update JSONPathMatcher.cs to cover the string path selection to a child
  • 9ce3236 Merge pull request #1 from DayLightDancer/DayLightDancer-patch-1
  • 3a6c7c6 Added unit tests
  • 9ed4e8e Addressed the comments
  • 3a24669 Addressed the comments
  • 274c546 Update JSONPathMatcher.cs

📊 Changes

2 files changed (+132 additions, -3 deletions)

View changed files

📝 src/WireMock.Net/Matchers/JSONPathMatcher.cs (+7 -2)
📝 test/WireMock.Net.Tests/Matchers/JsonPathMatcherTests.cs (+125 -1)

📄 Description

The .SelectToken method accept string path selection and JSONPath queries. The current code works only for the queries because the result is JObject. When the string path is selected the result is JValue and event with a valid result the code the code doesn't return valued result.
https://www.newtonsoft.com/json/help/html/SelectToken.htm


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/wiremock/WireMock.Net/pull/993 **Author:** [@DayLightDancer](https://github.com/DayLightDancer) **Created:** 8/15/2023 **Status:** ✅ Merged **Merged:** 8/17/2023 **Merged by:** [@StefH](https://github.com/StefH) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (6) - [`7924d0a`](https://github.com/wiremock/WireMock.Net/commit/7924d0aff128e1fbd4a7c51d13241db44bda45ee) Update JSONPathMatcher.cs to cover the string path selection to a child - [`9ce3236`](https://github.com/wiremock/WireMock.Net/commit/9ce32364a6eea3d5a2d1aa19f374b93662e642bc) Merge pull request #1 from DayLightDancer/DayLightDancer-patch-1 - [`3a6c7c6`](https://github.com/wiremock/WireMock.Net/commit/3a6c7c6f7e58658f40fcb4e3b7b116553ea5c485) Added unit tests - [`9ed4e8e`](https://github.com/wiremock/WireMock.Net/commit/9ed4e8e16947923eb79611553ddb612f6dc8e5bb) Addressed the comments - [`3a24669`](https://github.com/wiremock/WireMock.Net/commit/3a246690c2cccd5bf4d9fe464be3d750b679d216) Addressed the comments - [`274c546`](https://github.com/wiremock/WireMock.Net/commit/274c5461751ab0d249526b9ee758aeda18281c6f) Update JSONPathMatcher.cs ### 📊 Changes **2 files changed** (+132 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/WireMock.Net/Matchers/JSONPathMatcher.cs` (+7 -2) 📝 `test/WireMock.Net.Tests/Matchers/JsonPathMatcherTests.cs` (+125 -1) </details> ### 📄 Description The .SelectToken method accept string path selection and JSONPath queries. The current code works only for the queries because the result is JObject. When the string path is selected the result is JValue and event with a valid result the code the code doesn't return valued result. https://www.newtonsoft.com/json/help/html/SelectToken.htm --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 09:18:48 +01:00
adam closed this issue 2025-12-29 09:18:48 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WireMock.Net#1182