3 ms·
Not sure what they mean by "json gem", as it comes with ruby and not installed via gem install command. I've always used require 'json/ext' This uses the C e
by nurettin 1y ago
Not sure what they mean by "json gem", as it comes with ruby and not installed via gem install command.
I've always used
require 'json/ext'
This uses the C extension version and is much faster.
- byroot 1y ago`json` is a "default gem": https://stdgems.org/ https://stdgems.org/ Meaning Ruby ships with that gem pre-installed, but it's still a gem and you can upgrade/downgrade it in your gemfile if you so chose. As for `require "json/ext"` that's outdated knowledge.
- nurettin 1y agoHaha I'd imagine it is outdated. It is from 10+ years ago.