Skip to content

Instantly share code, notes, and snippets.

@denisdefreyne
Created August 25, 2014 15:02
Show Gist options
  • Save denisdefreyne/123db969fdc2fe1dd6ac to your computer and use it in GitHub Desktop.
Save denisdefreyne/123db969fdc2fe1dd6ac to your computer and use it in GitHub Desktop.
JSON.load vs JSON.parse
require 'json'
# => true
JSON.load('')
# => nil
JSON.parse('')
# JSON::ParserError: A JSON text must at least contain two octets!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment