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

GoFSH incorrectly converts decimal types to strings #260

Open
rgeimer opened this issue Jun 13, 2024 · 1 comment
Open

GoFSH incorrectly converts decimal types to strings #260

rgeimer opened this issue Jun 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rgeimer
Copy link

rgeimer commented Jun 13, 2024

I ran GoFSH on a Location instance that was in XML format using the -f xml-only option, and the result looked like this:

Instance: orgloc
InstanceOf: Location
Usage: #inline

  • position.longitude = "-97.7047386"
  • position.latitude = "30.4159542"

When I ran Sushi on this I got the following error:

Sushi: error Cannot assign string value: -97.7047386. Value does not match element type: decimal (00:00.011 / 00:07.834, 46Mb)

Sushi: error Cannot assign string value: 30.4159542. Value does not match element type: decimal (00:00.000 / 00:07.837, 46Mb)

When I manually removed the quotes in the output, Sushi compiled it fine. Here is the correct output:

Instance: orgloc
InstanceOf: Location
Usage: #inline

  • position.longitude = -97.7047386
  • position.latitude = 30.4159542
@jafeltra
Copy link
Collaborator

Thanks for reporting this. It does look like there is a bug in GoFSH when processing decimal values from XML files that will need to be addressed.

@jafeltra jafeltra added the bug Something isn't working label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants