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

Strip null values from JSON-LD hash #249

Merged
merged 2 commits into from
Nov 16, 2017
Merged

Strip null values from JSON-LD hash #249

merged 2 commits into from
Nov 16, 2017

Conversation

benbalter
Copy link
Collaborator

If we're minifying the JSON-LD, it doesn't make sense to include null values in the output, introduce when we moved to JSONLDDrop.

This PR adds a custom to_json method to the drop (which liquid calls via jsonify) to strip null values from the hash (which the spec says to ignore).

Fixes #233.

Copy link
Member

@pathawks pathawks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍻👍

@benbalter benbalter merged commit 38b0fbd into master Nov 16, 2017
@benbalter benbalter deleted the strip-null-values branch November 16, 2017 19:36
@pathawks pathawks mentioned this pull request Jan 18, 2018
@jekyll jekyll locked and limited conversation to collaborators May 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove null values from JSON-LD
4 participants