can't parse JSON
See original GitHub issueQ&A (please complete the following information)
- OS: Windows 10 version 1709
- Browser: Edge
- Version: 41.16299.611.0
- Method of installation: [e.g. npm, dist assets]
- Swagger-UI version: 3.18
- Swagger/OpenAPI version: [e.g. Swagger 2.0, OpenAPI 3.0]
Content & configuration
Example Swagger/OpenAPI definition:
# your YAML here
Swagger-UI configuration options:
SwaggerUI({
// your config options here
})
?yourQueryStringConfig
Describe the bug you’re encountering
To reproduce…
Steps to reproduce the behavior:
- Click the execute button for a Get method
- The response that comes back is “can’t parse JSON”
Expected behavior
The JSON that is returned loads
Screenshots
Additional context or thoughts
If I hit the endpoint in the browser directly valid JSON is returned. I put the JSON in a validation tool and it came back as being valid. I found a post that indicated that this needed to be added to the web.config:
<add name="Access-Control-Expose-Headers" value="Content-Disposition"/>
That didn’t solve the problem.
This does work in IE11 and Chrome, just not Edge.
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Can't parse JSON error - Scripting Support
print(Admins) works correctly and prints the pastebin, but when I attempt to call JSONDecode on Admins it says it can't parse the JSON....
Read more >javascript - Can't parse JSON response
Your response is an object containing one property named "AgApplyTableE*!", which is an array that contains one element, which is an object ...
Read more >SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
JSON.parse() parses a string as JSON. This string has to be valid JSON and will throw this error if incorrect syntax was encountered....
Read more >JSON Exception Error Not able to Parse JSON
Hi Gunasekaren, Correct. In running a Gt request to Analytics plus and the Returning JSON will not parse. its failing on the client...
Read more >Codable: Can't Parse JSON File Swift Xcode 12
I am trying to parse a JSON file that has this structure: Code Block. {. "species":[. {. "name":"Aglais io",. "info": {. "family":"Nymphalidae",.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey, out of curiosity I tried also using Windows 10 with Edge (using version 42 instead of 41 though) and didn’t have any issues with JSON response parsing. I used browserstack which lets you test IE edge for free. Test was against an api using the OAS 3 spec with swagger-ui 3.18.2
@jlw0, glad to hear it worked out!
Closing - on the whole, this seems like an issue caused by an old version of Edge.