summaryrefslogtreecommitdiff
path: root/29/8530babe2ca9a364458956aa8675c203e313e4
blob: 8874943c88dd3425a56f3f8fceaf7ae643051231 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
Return-Path: <marcel@jamin.net>
Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org
	[172.17.192.35])
	by mail.linuxfoundation.org (Postfix) with ESMTPS id AE1565B1
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue,  7 Mar 2017 09:29:26 +0000 (UTC)
X-Greylist: whitelisted by SQLgrey-1.7.6
Received: from mail-ua0-f169.google.com (mail-ua0-f169.google.com
	[209.85.217.169])
	by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D1013136
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue,  7 Mar 2017 09:29:25 +0000 (UTC)
Received: by mail-ua0-f169.google.com with SMTP id u30so68180949uau.0
	for <bitcoin-dev@lists.linuxfoundation.org>;
	Tue, 07 Mar 2017 01:29:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=jamin-net.20150623.gappssmtp.com; s=20150623;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to; 
	bh=BVILZIm24cFq4X45pRaGKflI87FETShFs15vymH+kJY=;
	b=hWXRAuMtzH+bZZ7FE0lSGTPCBYExliAPwqv42xptM97YbphVjDX8WoyPwPnYM5U+Yq
	MuwHLNKNhx71KKJbdGEaJiyC3lgBnRNh2V7oRolBg5w1HHPUzAipcZm0EFyYOaEhWQWb
	BrQwJXRjOCEQhrBVeCrvpgBR7rvj0ktuyDTQvMdbYj9sEvurIWYcfp+OikGdud64vXPL
	6p8WnJaQ0I5m0jFV1c+LmFKoqEdUDp0Y7xklHsicuF2qoNVExPyxUUARvUEq99KUkjxo
	IfXTYiEPA2sJbL9j80xlGHgsyhN43ra3o+urn1ZV3P7hN9qMVqhWC0RmgpztYi5TM6oo
	ciGA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=1e100.net; s=20161025;
	h=x-gm-message-state:mime-version:in-reply-to:references:from:date
	:message-id:subject:to;
	bh=BVILZIm24cFq4X45pRaGKflI87FETShFs15vymH+kJY=;
	b=qivHhuPR/jPW4LymT1c1rMiQyp3Y800dwxB6uDRNv11wo/Lki6+qvxNAunP9mM3CkE
	shPS1IbDJ17yIj85E8bd6pqQhDFCFL1hmoZPxJ8n81pylpzaIqEsKfn/AyJaS8Wa//eR
	MYwNdcZG+QEWcMS3a3wNPDLTky/UlxWCJkrpU1Ml+dG7XdmgNq4tZ5stpm3OIXrr/DVZ
	CuzRJ+ImNq9x4zt12CINelS50Vb+p/x06/HuBLWL16Grn1pZ+MkSzxAqwgWg0WfldiOu
	DeyEhrk+eiVEq01jLM1/SImC1IVBp1KI2lkfsA7Pi+WNWMymA9Gy41Qs4kzs8vtfOzsv
	o42A==
X-Gm-Message-State: AMke39m6YUZJgNT8O72nu0rMYN2dSqL7X/8jvoPavOlJE+OwqOk7JGe7jqxnEB0SzrP/fmTekc3mtMcAdj6+lw==
X-Received: by 10.176.69.137 with SMTP id u9mr9462888uau.164.1488878964777;
	Tue, 07 Mar 2017 01:29:24 -0800 (PST)
MIME-Version: 1.0
Received: by 10.103.30.194 with HTTP; Tue, 7 Mar 2017 01:29:24 -0800 (PST)
In-Reply-To: <201703040827.33798.luke@dashjr.org>
References: <201703040827.33798.luke@dashjr.org>
From: Marcel Jamin <marcel@jamin.net>
Date: Tue, 7 Mar 2017 10:29:24 +0100
Message-ID: <CAAUq487pjZYTZJDNv2TL8Vwh-nGqaFVZLG1v4VUJu=ejcx45nw@mail.gmail.com>
To: Luke Dashjr <luke@dashjr.org>, 
	Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Content-Type: text/plain; charset=UTF-8
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
	smtp1.linux-foundation.org
X-Mailman-Approved-At: Tue, 07 Mar 2017 14:07:38 +0000
Subject: Re: [bitcoin-dev] Currency/exchange rate information API
X-BeenThere: bitcoin-dev@lists.linuxfoundation.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org>
List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe>
List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/>
List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org>
List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help>
List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>,
	<mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Mar 2017 09:29:26 -0000

> 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?
> * Clients should word-wrap long lines, and JSON escapes newlines as "\n" which can be used doubly ("\n\n") for paragraph breaks.

I'd file this under premature optimization at the cost of
interoperability. If you use JSON, then please use it properly.

I'd also say it's the job of the parser to offer a way of doing that,
e.g. in .NET you can easily achieve that with Newtonsoft's JSON
parser: http://stackoverflow.com/questions/20374083/deserialize-json-array-stream-one-item-at-a-time.

On 4 March 2017 at 09:27, Luke Dashjr via bitcoin-dev
<bitcoin-dev@lists.linuxfoundation.org> wrote:
>
> Investigating what it would take to add fiat currency information to Bitcoin
> Knots, I noticed Electrum currently has many implementations, one for each
> exchange rate provider, due to lack of a common format for such data.
>
> Therefore, I put together an initial draft of a BIP that could standardise
> this so wallets (or other software) and exchange rate providers can simply
> interoperate without a lot of overhead reimplementing the same thing many
> ways.
>
> One thing I am unsure about, is that currently this draft requires using XBT
> (as BTC) for Bitcoin amounts. It would seem nicer to use satoshis, but those
> don't really have a pseudo-ISO currency code to fit in nicely...
>
> Current draft here:
>     https://github.com/luke-jr/bips/blob/bip-xchgrate/bip-xchgrate.mediawiki
>
> Thoughts? Anything critical missing? Ways to make the interface better?
>
> Luke
> _______________________________________________
> bitcoin-dev mailing list
> bitcoin-dev@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev