- From: Manu Sporny <msporny@digitalbazaar.com>
- Date: Thu, 29 Nov 2012 13:09:42 -0500
- To: opentransact@googlegroups.com
- CC: Melvin Carvalho <melvincarvalho@gmail.com>, Web Payments <public-webpayments@w3.org>
On 11/29/12 11:17, Melvin Carvalho wrote: > I've been looking at the terms 'to' and 'from' wrt a transfer in > webcredits / opentransact / payswarm and pingback ongologies > > Payswarm uses > > source destination Note that since PaySwarm uses JSON-LD, the developer can change this to anything that they want to. You can just as easily do this: { 'id': 'http://bluebank.com/transactions/329873', 'source': 'http://payswarm.example.com/accounts/blue', 'destination': 'http://redbank.com/accounts/red', 'amount': '50.43', 'currency': 'USD' } as this: { 'id': 'http://bluebank.com/transactions/329873', 'from': 'http://payswarm.example.com/accounts/blue', 'to': 'http://redbank.com/accounts/red', 'amount': '50.43', 'currency': 'USD', } You just need to declare this context for the first example: '@context': { '@id': 'id', // alias @id to id 'source': { '@id': 'http://purl.org/commerce#source', '@type': '@id' // source is an IRI }, 'destination': { '@id': 'http://purl.org/commerce#destination', '@type': '@id' // destination is an IRI }, ... } and this context for the second one: '@context': { 'from': { '@id': 'http://purl.org/commerce#source', '@type': '@id' // from is an IRI }, 'to': { '@id': 'http://purl.org/commerce#destination', '@type': '@id' // to is an IRI }, ... } Ultimately, it's up to the developers to pick what they'd like... a PaySwarm service consuming an object like the above could accept either. As for preference, I personally don't have any strong feelings one way or the other. Pelle's argument about it being similar to e-mail is the argument that is resonating the most with me regarding changing it in the spec. My concern is that it's too generic and some people might be annoyed that we've squatted on something as generic as 'to' and 'from' and that they'd want to use those keywords in their application. However, the same argument could be made for 'source' and 'destination'. One compromise would be allowing 'source', 'destination', 'to', and 'from' in the PaySwarm JSON-LD context. That would allow the developer to use whatever they wanted to use... but then, it would be a failure to standardize on something. :P -- manu -- Manu Sporny (skype: msporny, twitter: manusporny) President/CEO - Digital Bazaar, Inc. blog: HTML5 and RDFa 1.1 http://manu.sporny.org/2012/html5-and-rdfa/
Received on Thursday, 29 November 2012 18:10:12 UTC