lian / bitcoin-ruby

bitcoin utils and protocol in ruby.
Other
922 stars 322 forks source link

Deprecate and then remove to_json methods #267

Open etscrivner opened 6 years ago

etscrivner commented 6 years ago

The to_json methods on blocks and transactions are somewhat out of place. Originally they were used to support a blockchain explorer, but this use-case no longer exists. The place to phase these out would take the following steps:

  1. Add a deprecation warning to let users know these methods are going away and do a release.
  2. Completely remove the methods and all associated tests in a follow-on major release.
etscrivner commented 5 years ago

@lian It sounds like from your comment on #280 that you'd want to deprecate and remove all JSON methods, meaning to_json* and from_json*. Is this accurate?

lian commented 5 years ago

yea, think we should deprecate them and remove move all of them. unsure about to_hash and from_hash, but even if we keep them we might remove their script.to_string output and just output scripts as hex

etscrivner commented 5 years ago

@lian Updated, let me know if this looks good.