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

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

Merged
merged 3 commits into from
Feb 19, 2015
Merged

Conversation

patricksnape
Copy link
Contributor

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.

Simple try/except pattern - try images then landmarks.
Now importing null values is correctly coerced to nan
instead of None

Also, added tests for this.
When serializing nan values from menpo, they should go down
as null. When deserializing null values, they should be returned
as nan.
patricksnape pushed a commit that referenced this pull request Feb 19, 2015
@patricksnape patricksnape merged commit 98da6d5 into menpo:0.4.x Feb 19, 2015
@patricksnape patricksnape deleted the ljson_nan_fix branch February 19, 2015 17:55
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