-
Notifications
You must be signed in to change notification settings - Fork 2
Documentation of byte sequences added #481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for byte sequences in the JsonPreprocessor, allowing users to embed binary values using hexadecimal escape notation (e.g., b'\x52\x6f\x62...'). The implementation introduces a token-based system to handle byte values during JSON parsing and includes comprehensive documentation of this new feature.
Key changes:
- New byte value handling mechanism using token replacement during parsing
- Enhanced Python inline code syntax validation with improved error messages
- Documentation explaining byte sequence usage and requirements
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packagedoc/additional_docs/The JSONP format.tex | Adds documentation section explaining byte sequence syntax and usage with examples |
| JsonPreprocessor/CJsonPreprocessor.py | Implements byte value parsing via tokenization, refactors Python inline code validation, and adds byte value restoration logic |
Comments suppressed due to low confidence (1)
JsonPreprocessor/CJsonPreprocessor.py:1930
- The error handling pattern is inconsistent with the refactored approach. Lines 1929-1930 raise the exception immediately, but the refactored code at lines 1936-1938 defers the exception raising. This block should set
errorMsgand let it be raised at lines 1936-1938 to maintain consistency.
if pyInlineCode.count('"') % 2 == 1:
errorMsg = f"Invalid syntax in the Python inline code '{pyInlineCode}'."
self.__reset()
raise Exception(errorMsg)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
test-fullautomation
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Holger,
looks good to me!
Thank you,
Thomas
|
Hi Thomas, you can decline #482 now. With this merged pull request also the new bytesequence feature itself is released (not only my documentation update). Previously I wanted to let it on Son to decide about a release of this feature. |
|
Hi @namsonx , |
Oh, this makes me sick!
I only wanted to push the documentation changes. But not the entire feature.
Please decline this pull request. I will create another one to the stabi branch.
Successor: #482