canvas-lms icon indicating copy to clipboard operation
canvas-lms copied to clipboard

api /api/v1 returned json contains values without string quotes

Open 2jt opened this issue 2 years ago • 1 comments

Hi. On a self-hosted canvas instance api endpoints (for example /api/v1/courses/some-course-id/assignments) return json containing attributes like (url, html_url) with their values not being strings (meaning, not being wrapped in " "). Obviously trying to parse json containing these values breaks. On any other canvas instance I've tried (all of them deployed on dlg.instructure), a GET request using browser returns a valid json from that same endpoint (url, html_url values are wrapped with string quotes).

What could be that causes canvas to return this kind of json?

2jt avatar Jul 06 '22 12:07 2jt

I've never seen Canvas do anything like that. I have heard of browsers or other http services causing issues like that. What are you using to request the API data?

Ardena avatar Aug 02 '22 18:08 Ardena