1
0
mirror of https://github.com/bitcoin/bips.git synced 2025-05-12 12:03:29 +00:00

bip-xchgrate: Begin Rationale section

This commit is contained in:
Luke Dashjr 2017-03-04 23:46:46 +00:00
parent 019d922851
commit 3b29e5d3fa

View File

@ -117,6 +117,17 @@ There are many independent providers of such information, but they all use diffe
By providing a standard interface for retrieving this information, wallets (and other software) and service providers can implement it once, and become immediately interoperable with all other compatible implementations.
==Rationale==
Why are multiple results separated by a line-feed rather than using a JSON Array?
* Clients ought to cache historical data, and using a line-feed format allows them to simply append to a cache file.
* Parsing JSON typically requires the entire data parsed together as a single memory object. Using simple lines to separate results, however, allows parsing a single result at a time.
What if long descriptions require line and paragraph breaks?
* Long descriptions support HTML, which has entities for paragraphs and line breaks that do not require literal line-feeds in the data.
==Backwards compatibility==
While this new standard is adopted, software and providers can continue to use and provide their current formats until they are no longer needed.