Closed eapache closed 10 years ago
I thought about that too. Here's what convinced me not to bother:
1) Ejson starts a ruby process, then decrypts/encrypts a single JSON document, typically 2-200 lines long. The JSON part of that works out to less than 1% of the runtime. 2) OJ is another dependency. Thor isn't exactly lightweight, but I still want to be conservative about adding more.
I like the simplicity of using the builtin one more than I like the ~1% perceived performance improvement of using a sane JSON implementation.
Fair. Presumably revisitable if someone starts trying to use this on many-MB json?
Yeah, absolutely, though I think if you have multi-megabyte secrets you're doing something wrong.
Probably :)
https://github.com/ohler55/oj
I started using it for my StarScope gem because it is substantially faster.