Skip to content

Conversation

@HolQue
Copy link
Collaborator

@HolQue HolQue commented Nov 6, 2025

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

@HolQue HolQue requested review from Copilot and namsonx November 6, 2025 09:01
Copy link
Contributor

Copilot AI left a 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 errorMsg and 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>
Copy link
Owner

@test-fullautomation test-fullautomation left a 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

@github-project-automation github-project-automation bot moved this from Open to In Progress in RobotFramework AIO Nov 6, 2025
@test-fullautomation test-fullautomation merged commit 04f3559 into develop Nov 6, 2025
6 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in RobotFramework AIO Nov 6, 2025
@test-fullautomation
Copy link
Owner

test-fullautomation commented Nov 6, 2025

Hi @HolQue ,
sorry due to the clear headline I read the comment not to merge to late.
Please provide a new pull-request.
Does #482 solve the wrong merge now, or does it need an update.
Thank you,
Thomas

@HolQue
Copy link
Collaborator Author

HolQue commented Nov 6, 2025

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.

@test-fullautomation
Copy link
Owner

Hi @namsonx ,
this already merged pull request accidentally contains codes related to byte-sequences.
Please review if correct and rebase your stabi branch.
Thank you,
Thomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.14.3 enhancement New feature or request

Projects

Development

Successfully merging this pull request may close these issues.

4 participants