- From: Cullen Jennings (fluffy) <fluffy@cisco.com>
- Date: Mon, 27 Aug 2012 13:58:12 +0000
- To: Tommy Widenflycht (ᛏᚮᛘᛘᚤ) <tommyw@google.com>
- CC: Harald Alvestrand <harald@alvestrand.no>, "<public-webrtc@w3.org>" <public-webrtc@w3.org>
On Aug 27, 2012, at 2:20 AM, Tommy Widenflycht (ᛏᚮᛘᛘᚤ) <tommyw@google.com> wrote: > > On Fri, Aug 24, 2012 at 7:32 PM, Harald Alvestrand <harald@alvestrand.no> wrote: > On 08/24/2012 05:51 PM, Randell Jesup wrote: > On 8/24/2012 10:43 AM, Tommy Widenflycht (ᛏᚮᛘᛘᚤ) wrote: > It has been pointed out to me that the stringify algorithm is broken, > especially for RTCSessionDescription since the sdp member most certainly > contains newlines. Should had noticed that myself, doh. > > Also some clarification regarding exactly what the end result is need to > be put in the specification. > We had a discussion regarding if this was meant to be JSON or not. > > /Tommy > > On Wed, Aug 22, 2012 at 2:10 PM, Tommy Widenflycht (ᛏᚮᛘᛘᚤ) > <tommyw@google.com <mailto:tommyw@google.com>> wrote: > > I'm fine both with removing the stringifier and letting it create > "JS object strings" as long as everyone understands that it > isn't necessarily JSON compatible. > > JSON.stringify(object) != (string)object > > So, we have 3 options: > 1) Use the current stringifier (with fixes for newlines, maybe quotes) > 2) Move it to valid JSON (newlines, quotes, parens, ?) > 3) drop the stringifier and use "JS object strings" (what's the impact of this? > If we drop the stringifier, I think the result of trying to interpret the object as a string is "{ object object }", which is well defined, but kind of useless. > > I wouldn't mind dropping it until we find a good reason to standardize it; people who want a particular stringification can write their own stringifiers. > > > > > +1 > > Especially since 100% compliant JSON can be produced with just one line: JSON.stringify(object). > Why add duplicate functionality? > > /Tommy > > -- > Tommy Widenflycht | Senior Software Engineer | tommyw@google.com | +46 734162531 > Google Sweden AB, Kungsbron 2, SE-11122 Stockholm, Sweden > Org. nr. 556656-6880 > > So I think it should be exactly the JSON form. However, if we remove the stringier, I think the spec should point out that JSON.stringify(object) is a good way to get a string that can be used to re-constuct the object by simply using JSON.parse( string)
Received on Monday, 27 August 2012 13:59:04 UTC