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

Parse hex numbers #270

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

giacomolicari
Copy link

@giacomolicari giacomolicari commented Nov 2, 2023

This PR adds the ability for the scraper to convert hex numbers into float64.

Concrete example, if we have a JSON like:

{"jsonrpc":"2.0","result":"0x1d55359","id":83}

where the key result is an hex representation of an integer, and we want that hex data to be correctly interpreted into a number, we would get it parsed from 0x1d55359 to 30757721.

Also add a Dockerfile that builds the project.

@giacomolicari giacomolicari changed the title Hex parser Parse hex numbers Nov 2, 2023
Giacomo Licari added 3 commits November 2, 2023 15:18
Signed-off-by: Giacomo Licari <[email protected]>
Signed-off-by: Giacomo Licari <[email protected]>
@joaovitor-cx
Copy link

Hi @giacomolicari,
Can you merge or rebase your branch with master?
I tested this pr locally with an hex number and it worked.

Maybe circleci pass merging master in this pr.

BTW thanks for the change.

@joaovitor-cx
Copy link

@giacomolicari the tests are failing in ci because of fmt...

gofmt -s -w .

solves that...

Can you please update this pr with that?

@guillheu
Copy link

guillheu commented Aug 8, 2024

I'd really like this feature as well, hoping for the fix to get pushed soon...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants