Repository navigation
Conversation
The JSON parser reads only per-call options, ignoring the documented constructor setting. Archived searches cannot receive a per-call parser option at all. Fall back to the constructor setting before the default of true. Keep explicit per-call overrides and outgoing requests unchanged. Fixes serpapi#44
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this does
Read the parser option with precedence: per-call, constructor, then
true.Previously the documented constructor setting was ignored. This is one
production-line change plus a changelog entry and 16 focused examples.
It follows the existing
Hash#fetchparser implementation.Five examples fail on the base: constructor
falsefor search in bothconnection modes, archive, account, and upload. The other examples guard
defaults, explicit overrides, text output, and parser-option stripping
from GET query and POST form fields.
No public method or dependency is added. Error-policy fixes remain in
#42; Hash mutation remains
in #39. Closed
#22 is prior work.
The current patches for #39 and #42 apply alongside this change.
Merge order: error detection reads Symbol keys only, so on
masteralone, clients that set
falsein the constructor inherit the existingper-call
falsegap (a200witherroris returned, not raised).#42 closes that gap. With #42 applied, constructor
falsematches thedefault for empty results,
status: "Error", and401. Please mergethis after #42, or tell me if you prefer a different order.
No live fixture needs re-recording because requests are unchanged.
The constructor already documents this option, so no README change is
needed. The new spec stubs the HTTP transport, like
image_api_spec.rb.Type of change
Scope check
Related issue
Fixes #44
Quality check
bundle exec rake lint, 9 files, zero offenses (no project hooks configured)The compatibility and regression harnesses disabled network access.
The mocked specs used a non-secret invalid placeholder solely
to satisfy the global guard. SimpleCov started after the library loaded,
so its printed coverage is not evidence of coverage completeness.
Ownership
API changes