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

Scientific format received as a result of deserialization #12

Open
CimermanDenis opened this issue Jan 24, 2025 · 1 comment
Open

Scientific format received as a result of deserialization #12

CimermanDenis opened this issue Jan 24, 2025 · 1 comment

Comments

@CimermanDenis
Copy link

"value": 93.5 received in response from web service becomes 9.3500000000000000E+01 after deserialization. I am not using any mapping to tables/structures but "direct" access to fields via /ui2/cl_data_access=>create. Is that a known issue that could be handled?

@alexey-arseniev
Copy link
Contributor

Hi Denis,

I assume it is by design. I also assume that instead of deserializing into a predefined data structure you are using GENERATE or DESERIALIZE into REF TO data. In this case, the class follows default logic for detecting the best data type for receiving structure, and everything that contains '.Ee' (93.5) will be the float (9.3500000000000000E+01). Which other type would you expect?

As said, if you need a specific type to be used for your receiving data you need to provide it as an input for deserialization.

BR, Alexey.

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

No branches or pull requests

2 participants