Skip to content
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

to_number built-in function should accept values prefixed with '+' #7207

Open
sikehish opened this issue Dec 5, 2024 · 3 comments
Open

to_number built-in function should accept values prefixed with '+' #7207

sikehish opened this issue Dec 5, 2024 · 3 comments

Comments

@sikehish
Copy link
Contributor

sikehish commented Dec 5, 2024

Short description

opa eval -f pretty --strict-builtin-errors 'to_number("42")'
42

While it accepts 42, it doesn't accept it when an explicit '+' sign is added like in the case below:

opa eval -f pretty --strict-builtin-errors 'to_number("+42")'
json: invalid number literal "+42"

This should ideally not be the case and it should pass through. The issue is related to JSON marshalling.

@sikehish sikehish added the bug label Dec 5, 2024
@sikehish
Copy link
Contributor Author

sikehish commented Dec 5, 2024

@anderseknert Shall I proceed with resolving it? Let me know if any changes are to be made in the above issue description :)

@anderseknert
Copy link
Member

Go ahead 👍

Copy link

stale bot commented Jan 4, 2025

This issue has been automatically marked as inactive because it has not had any activity in the last 30 days. Although currently inactive, the issue could still be considered and actively worked on in the future. More details about the use-case this issue attempts to address, the value provided by completing it or possible solutions to resolve it would help to prioritize the issue.

@stale stale bot added the inactive label Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants