question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JSONRequest naming issue

See original GitHub issue

A few months ago JSONRequest was added to Scrapy (https://github.com/scrapy/scrapy/pull/3505) and released with the new Scrapy version 1.7.

However, I realized that the name is not in accordance with the rest of the classes: HtmlResponse, XmlResponse, XmlRpcRequest.

It should be named: JsonRequest.

I know it isn’t backward-compatible, but as it’s a really recent addition and Scrapy 2.0 is on the way it could be fixed.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
novilunicommented, Aug 9, 2019

As all the classes in Scrapy starting with “JSON” (JsonLinesItemExporter, JsonItemExporter and JsonWriterPipeline) use that format, it could be a good idea.

If you all want to proceed I can re-open the original PR and adding the code to deprecate that class.

1reaction
Gallaeciocommented, Aug 8, 2019

Hey! As JSONRequest is what pep8 recommends, we (me, @dangra, @Gallaecio and @wRAR) agreed to rename other classes instead. PRs are welcome 😃

@kmike at https://github.com/scrapy/scrapy/pull/3930#issuecomment-519518983

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSON request formatting issue - java - Stack Overflow
I guess the reason why you're using @JsonProperty is that the name of the parameters in your json (FirstName, LastName) are different from...
Read more >
Issue mapping JSON request | Support Center
Hi, I've this particular issue mapping json attribute of a REST ... the only reason is that I know that Pega naming convention...
Read more >
Need help on the JSON request - Getting error with Azure ...
I am working on the web-service which accepts JSON request. ... please check the below JSON request and let me know if there...
Read more >
JSON request message for Name Value pair field - ServiceNow
Hi, I have exposed REST API for POST method to be able to create records of the data received from ext system on...
Read more >
Getting issue with passing string variable in JSON request
Getting issue with passing string variable in JSON request [closed] ... and without having to enclose JSON field names in quotes.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found