docs(time): remove trailing comma in convert_time example response#4142
Open
abhicris wants to merge 1 commit into
Open
docs(time): remove trailing comma in convert_time example response#4142abhicris wants to merge 1 commit into
abhicris wants to merge 1 commit into
Conversation
The example response object for the convert_time tool in src/time/README.md
had a trailing comma after the last key ("time_difference"). Trailing
commas are not valid in standard JSON, so anyone copy-pasting the example
into a strict JSON parser (or using it in a test fixture) hits a parse
error.
The trailing comma was left over when a now-removed 'date_changed' field
was deleted from the example; the comma after the preceding key was never
cleaned up.
This is a docs-only, 1-line change.
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.
The example response object for the
convert_timetool insrc/time/README.mdhad a trailing comma after the last key ("time_difference").Trailing commas are not valid in standard JSON (RFC 8259 §2), so anyone copy-pasting the example into a strict JSON parser (e.g.
json.loadsin Python,JSON.parsein JS, a test fixture, or a schema validator) hits a parse error on what is documented as a valid response.Why
Looking at the git history, the trailing comma was left over when a now-removed
"date_changed": truefield was deleted from the example. The comma after the precedingtime_differencekey was never cleaned up.This makes the README example self-consistent with how the server actually serializes responses (via
pydantic/json.dumps, which never emit trailing commas).Scope
src/time/README.mdjson.loadsTypes of changes
Part of open-source blockchain work from kcolbchain.com - maintained by Abhishek Krishna.