Calling Developers!
We are reenergizing our code contribution process! Learn More

What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello, I’m using Spryker’s docker environment and found error with json_encode (and spryker’s json s

Options
USZB5JN4W
USZB5JN4W Posts: 112 🧑🏻‍🚀 - Cadet

Hello,
I’m using Spryker’s docker environment and found error with json_encode (and spryker’s json service). PRobably because wrong precission and serialize_precision configs it jsonizes floats to the strange numbers, eg 7051.22 to 7051.2200000000003. Have you faced this problem? How can i fix it without overwriting docker/sdk files?

Comments

  • sprymiker
    sprymiker Cloud Platform Architect Sprykee Posts: 781 🧑🏻‍🚀 - Cadet
    Options

    Hello,

    You can set any INI parameter via deploy.yml according the doc

    But I would like to advise you to avoid using floats at all.

  • USZB5JN4W
    USZB5JN4W Posts: 112 🧑🏻‍🚀 - Cadet
    Options

    thanks

  • USZB5JN4W
    USZB5JN4W Posts: 112 🧑🏻‍🚀 - Cadet
    Options

    sadly I can’t stop using floats. Some 3rd party apis require them 😉