I'm sending this to the list to save others
from wasting their time as I so unfortunately
did.
Anthony
diff -r a0353a269983 src/pkg/json/scanner.go
--- a/src/pkg/json/scanner.go Mon Nov 01 17:49:06 2010 -0700
+++ b/src/pkg/json/scanner.go Tue Nov 02 00:11:18 2010 -0700
@@ -284,7 +284,7 @@
case parseObjectValue:
if c == ',' {
s.parseState[n-1] = parseObjectKey
- s.step = stateBeginString
+ s.step = stateBeginStringOrEmpty
return scanObjectValue
}
if c == '}' {
@@ -294,7 +294,7 @@
return s.error(c, "after object key:value pair")
case parseArrayValue:
if c == ',' {
- s.step = stateBeginValue
+ s.step = stateBeginValueOrEmpty
return scanArrayValue
}
if c == ']' {
Have you filed a bug report with firefox?
It seems better to fix the buggy firefox than to make Go buggy too.
--
=====================
http://jessta.id.au
Ah, looks like they'll fix it in the next version,
http://whereswalden.com/2010/09/08/spidermonkey-json-change-trailing-commas-no-longer-accepted/
--
=====================
http://jessta.id.au
I thought by posting to golang-nuts instead of
golang-dev there would be no confusion. Well, I
guess not. To be clear, I do not propose adding
this to the json package.
Anthony