Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 4    Views: 157

MadRod
Aspiring developer
Profile
Posts: 1848
Reg: Apr 12, 2012
Lisbon
27,880
10/03/14 05:54 AM (5 years ago)

Json File - Can you detect the error?

Hi, can anyone detect the error on these lines:

A problem occurred while fetching some data (1). The results were not valid JSON.
{"result":"success", "startIndex":"0", "totalNumberOfChildItems":"3", "childItems":[ {"itemId" : "FED1AA505753713A87B8AB1","itemType" : "BT_menuItem","titleText" : "SLB","descriptionText" : "CAMPEONATOS NACIONAIS GANHOS NOS ANOS: 1936 1937 1938 1942 1943 1945 1950 1955 1957 1960 1961 1963 1964 1965 1967 1968 1969 1971 1972 1973 1975 1976 1977 1981 1983 1984 1987 1989 1991 1994 2005 2010 2013","sectionValue" : 33.,"sectionColor" : "#FF0033", "orderIndex":"1"}, {"itemId" : "7D695D0ADC5EAA4677D7691","itemType" : "BT_menuItem","titleText" : "FCP","descriptionText" : "CAMPEONATOS NACIONAIS GANHOS NOS ANOS: 1935 1939 1940 1956 1959 1978 1979 1985 1986 1988 1990 1992 1993 1995 1996 1997 1998 1999 2003 2004 2006 2007 2008 2009 2011 2012 2013","sectionValue" : 27,"sectionColor" : "#0000CC", "orderIndex":"2"}, {"itemId" : "37A65043B1A3EC8BE45C466","itemType" : "BT_menuItem","titleText" : "SCP","descriptionText" : "CAMPEONATOS NACIONAIS GANHOS NOS ANOS: 1941 1944 1947 1948 1949 1951 1952 1953 1954 1958 1952 1966 1970 1974 1980 1982 2000 2002","sectionValue" : 18,"sectionColor" : "#009900", "orderIndex":"3"} ]}

Miguel
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
10/03/14 06:14 AM (5 years ago)
"sectionValue" : 27

the section values do not have any quotation marks around them
 
MadRod
Aspiring developer
Profile
Posts: 1848
Reg: Apr 12, 2012
Lisbon
27,880
like
10/03/14 06:17 AM (5 years ago)
I think that its the

"sectionValue" : 33.

But I'm unable to correct it, so just re-did it.

Thanks man.
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
10/03/14 06:18 AM (5 years ago)
no troubles bubbles
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
10/03/14 07:38 AM (5 years ago)
JSON numbers that are not in quotes are supposed to be interpreted as a number.

JSON numbers that are quoted are supposed to be interpreted as a string.

All the BT JSON I've run across grabs everything as a string, and then converts it to something else if need be. But my first version of that csv to json coverter I converted worked with numbers instead of strings, so my guess is the decimal point after 33, not the actual number itself.

Of course, by now the point is moot. Just thought I'd toss my thoughts in there.

Cheers!

-- Smug
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.