OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xdi message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Proposal: should we be able to roundtrip all JSON values? (was: Re: [xdi] Re: Proposal about null vs. undefined values)


Since there is much to debate on this thread (the issue of null/undefined values always seems to bleed over into existential philosophy ;-), I'm forking the thread just to focus on a more narrow issue: Joseph's proposal that we be able to roundtrip all JSON values, including null.

I favor this proposal for three reasons:
  1. It is simple, understandable, and unquestionably useful to all developers using JSON.
  2. It is consistent -- if you can store it, you can get it back, unambiguously.
  3. To Markus' point, JSON is not a programming language, it is a data model -- arguably one of the most generalized and widely used data models in the world.
Please reply as to whether you agree or disagree with this narrower proposal. (If we have agreement, then we can tackle the issue of how to map JSON null into the XDI graph model.)


On Sun, Aug 18, 2013 at 10:52 AM, Joseph Boyle <planetwork@josephboyle.net> wrote:
In short my recommendation is: just store JSON, don't have tricky special interpretation for null or any other JSON value.

How an XDI server should respond to an attempt to retrieve the value from an address where none has been assigned is a different matter to be specified by the XDI Messaging protocol(s). The result could be considered an error code or value, but should not be conflated with values of the JSON space, which should be reserved for client data with the client's choice of semantics.

On Aug 18, 2013, at 10:21 AM, Joseph Boyle <planetwork@josephboyle.net> wrote:
On Aug 18, 2013, at 8:53 AM, Markus Sabadello <markus.sabadello@xdi.org> wrote:

I am against introducing such a semantic distinction for the reasons I already mentioned.
When storing data, either it is there or it is not there.
I don't know of any data model that distinguishes between the three states null, not null, and undefined.

In general I find the approach of comparing XDI to programming languages (Java, _javascript_, Perl, ...) quite useless.

I also find the following sentence from the XDI TC minutes inapplicable since it only talks about one specific JSON implementation rather than the general concepts:
"Java’s null is not equivalent to JSON null but to JSON undefined"
http://json-lib.sourceforge.net/apidocs/jdk15/net/sf/json/JSONNull.html

The point of that note was just to further warn against equating JSON null with any particular semantics, even with no-value-assigned in XDI, because "null" can have completely different meanings in various contexts. It is arguing for independence from ciients' various programming languages, not for dependence on them.





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]