# Re: JSON-RPC password

Post by: satoshi on July 21, 2010, 04:07:57 PM

Quote from: gavinandresen on July 21, 2010, 12:11:10 PM

> I just did a quick survey of 20 .conf files in /etc on my debian system, and found:<br>
> &nbsp;1 file used "key value"<br>
> &nbsp;5 used "key=value"

Thanks for that survey!

I find "key value" a little unnatural. &nbsp;There ought to be a more definite separator between key and value that suggests assignment. &nbsp;The space people may just be getting lazy using their language's split function.<br>
key=some full sentence with spaces in it. &nbsp;# seems more clear<br>
key some full sentence with spaces in it. &nbsp;# than this

Allright then, lets go with self-parsed mapConfig, syntax:
\# comment
key=value

file extension .conf. &nbsp;What's the filename, is it ~/.bitcoin/settings.conf or ~/.bitcoin/bitcoin.conf or what?

I think we better strip whitespace at the beginning and end of the key and the value.<br>
\# user who likes column formatted<br>
k &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= value<br>
key &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= value<br>
longerkey = &nbsp;&nbsp;this sentence would be this &nbsp;&nbsp;&nbsp;# "this sentence would be this"<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;key = value &nbsp;&nbsp;# guess this is ok too<br>
&nbsp;&nbsp;nextkey = value<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;right = justified

The normal syntax should be "key=value", but you can't blame people for the occasional "key = value".

---

Source file: bitcoin-forum-satoshi-nakamoto.tgz

External link: https://bitcointalk.org/index.php?topic=461.msg4758#msg4758
