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

Stringified json is converted to json when using in stubbed responses(json) #1383

Open
GagandeepSharma060 opened this issue Oct 25, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@GagandeepSharma060
Copy link

GagandeepSharma060 commented Oct 25, 2024

Hi team,

Noticed un unusual behaviour last night. When creating json files for mocking(externalized examples), if i pass a stringified json then it is converted to json when interacting with the json server.

For example:

If in the json file I mention

value : "{\"browsers\":{\"firefox\":{\"name\":\"Firefox\",\"pref_url\":\"about:config\",\"releases\":{\"1\":{\"release_date\":\"2004-11-09\",\"status\":\"retired\",\"engine\":\"Gecko\",\"engine_version\":\"1.7\"}}}}}"

The server sends me

value:
{
  "browsers": {
    "firefox": {
      "name": "Firefox",
      "pref_url": "about:config",
      "releases": {
        "1": {
          "release_date": "2004-11-09",
          "status": "retired",
          "engine": "Gecko",
          "engine_version": "1.7"
        }
      }
    }
  }
}

Which is not what I want,

Can u please have a look. Thanks

@GagandeepSharma060
Copy link
Author

@joelrosario Cnn u or someone please confirm if this actually is an issue or something wrong with my implementation

@GagandeepSharma060
Copy link
Author

@harikrishnan83 Can u have a look please

@harikrishnan83
Copy link
Member

@GagandeepSharma060 Thanks for the follow up. I will get back to you shortly on this.

@harikrishnan83 harikrishnan83 self-assigned this Nov 11, 2024
@harikrishnan83 harikrishnan83 added the bug Something isn't working label Nov 12, 2024
@harikrishnan83
Copy link
Member

@GagandeepSharma060 Apologies for the delay on this. We are able to reproduce the issue based on your inputs. I will keep you posted on the progress of the fix for the same. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants