joseph / peregrin

A library for inspecting Zhooks, Ochooks and EPUBs, and converting between them.
http://ochook.org/peregrin
MIT License
37 stars 17 forks source link

Serialize Peregrin::Book to JSON #17

Open julien-c opened 11 years ago

julien-c commented 11 years ago

This is the first lines I've ever written in ruby, so please bear with me!

joseph commented 11 years ago

I like the idea. The one hesitation I have is that Peregrin currently has very simplistic dependencies, and these are needed for its core functionality. I have a preference for gems with few dependencies.

This is useful additional functionality, but not core functionality. Therefore, I wonder if we could make the dependency on the JSON gem optional? I'll sketch out an idea in a code comment — I'm interested in your feedback. If it makes what you want to do more difficult, I'm happy to entertain making JSON a core dependency.

julien-c commented 11 years ago

@joseph Looks perfect, and much more ruby-idiomatic than what I wrote.