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

Fix array json encoding for float values. #188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mmeloni
Copy link

@mmeloni mmeloni commented Sep 25, 2017

There is a bug when json encoding float values inside array:
Ex "bbox":[-66.11667,-11,-66.11667,-11]
ex -11 -> -11 but in order to accomplish to https://neo4j.com/docs/rest-docs/current/#_arrays we need to have -11.0 to avoid Invalid JSON array in POST body error. It's enough add JSON_PRESERVE_ZERO_FRACTION to inside json_encode call.
This is mandatory to use spatial plugin with rest.

There is a bug when json encoding float values inside array:
Ex "bbox":[-66.11667,-11,-66.11667,-11]
ex -11 -> -11 but in order to accomplish to https://neo4j.com/docs/rest-docs/current/#_arrays we need to have -11.0 to avoid Invalid JSON array in POST body error. It's enough add JSON_PRESERVE_ZERO_FRACTION to inside json_encode call.
This is mandatory to use spatial plugin with rest.
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.

1 participant