-2

How can parse this in xml or json ?

[,[[,"17879231","GOOGLE.GAB","RU","GOOGLE.GAB","USD","Google Apps для бизнеса",1,1,1,,1,,4000000,4000000,3,,0,,,1,,1401606000000,"Reseller2BillingSummary?cid\u003dO.DC.01wt7avs-RS.APPS-I0",,"GOOGLE.GAB_MONTHLY_OFFER_SMB_BASIC_RESELLER",[,2,,,1400908963946]
,,,,[,,,,0,1,,1]
,3,[,"GOOGLE.GAB_MONTHLY_OFFER_SMB_BASIC_RESELLER",[,"ru","Гибкий план","Гибкий план","Вы можете добавлять и удалять пользователей в любое время. В конце месяца вам будет выставлен счет за фактическое количество аккаунтов, которые обслуживались в течение месяца."]
,,[,,[,"ru","Google Apps","Google Apps","Google Apps"]
,"GOOGLE.GAB",[,"https://ssl.gstatic.com/apps/cpanel/resources/img/google-apps-32.png","https://ssl.gstatic.com/apps/cpanel/resources/img/google-apps-64.png"]
assylias
  • 321,522
  • 82
  • 660
  • 783

1 Answers1

0

That looks like a JSON array, similar to those used by Google to encode Protocol Buffers for JavaScript consumption (see http://docs.closure-library.googlecode.com/git/local_closure_goog_proto2_pbliteserializer.js.source.html).

You'll hardly be able to do anything useful with it though without the "rules" to interpret it: the meaning of a value depends on its position in the array (this is why there are so many empty items).

That said, to answer your question, use com.google.gwt.json.client.JSONParser.parseStrict or com.google.gwt.core.client.JsonUtils.<JsArrayMixed>safeEval (try parseLenient or unsafeEval if that doesn't work).

Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164