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

[0.4.x] Ljson nan/null fixes #556

Merged
merged 3 commits into from Feb 19, 2015

Conversation

Projects
None yet
1 participant
@patricksnape
Contributor

patricksnape commented Feb 19, 2015

Two separate small fixes:

  1. Importing built-in landmarks was broken. This is now fixed.
  2. Serializing nan values was leaving nan, which is not officially supported by JSON. De-serializing null values was causing an object array and null was serializing to None. Now, null will de-serialize to nan for landmarks and nan will serialize to null.

patricksnape added some commits Feb 19, 2015

Fix importing of builtin landmarks
Simple try/except pattern - try images then landmarks.
Allow loading of nan values for ljson
Now importing null values is correctly coerced to nan
instead of None

Also, added tests for this.
Handle null/nan values in ljson
When serializing nan values from menpo, they should go down
as null. When deserializing null values, they should be returned
as nan.

patricksnape added a commit that referenced this pull request Feb 19, 2015

Merge pull request #556 from patricksnape/ljson_nan_fix
[0.4.x] Ljson nan/null fixes

@patricksnape patricksnape merged commit 98da6d5 into menpo:0.4.x Feb 19, 2015

2 checks passed

continuous-integration/appveyor AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@patricksnape patricksnape deleted the patricksnape:ljson_nan_fix branch Feb 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment