sktanmoy Active Member Licensed User Longtime User Jan 26, 2013 #1 I want to learn basic of JSON parsing. I mean when to use map, when to use list, when nextarray and when nextobject. Any rich resource? I check a tutorial by Erel but failed to understand properly.:BangHead:
I want to learn basic of JSON parsing. I mean when to use map, when to use list, when nextarray and when nextobject. Any rich resource? I check a tutorial by Erel but failed to understand properly.:BangHead:
Erel B4X founder Staff member Licensed User Longtime User Jan 27, 2013 #2 There are many resources in the internet about JSON format. Upvote 0
sktanmoy Active Member Licensed User Longtime User Jan 27, 2013 #3 Erel said: There are many resources in the internet about JSON format. Click to expand... I worked with JSON for many web based app (PHP). So I know JSON. The issue I'm facing is to use that in B4A. For instance, in json, {} is for object and [] for array. JSON library has NextArry and NextObject. I checked some tutorial but didn't noticed to use nextarray for []. Ex. This One Same confusion in using map and list. I need to be clear about usage of those.:sign0104: Upvote 0
Erel said: There are many resources in the internet about JSON format. Click to expand... I worked with JSON for many web based app (PHP). So I know JSON. The issue I'm facing is to use that in B4A. For instance, in json, {} is for object and [] for array. JSON library has NextArry and NextObject. I checked some tutorial but didn't noticed to use nextarray for []. Ex. This One Same confusion in using map and list. I need to be clear about usage of those.:sign0104:
Erel B4X founder Staff member Licensed User Longtime User Jan 27, 2013 #4 If the json string starts with { => call JSON.NextObject If the json string starts with [ => call JSON.NextArray Upvote 0
If the json string starts with { => call JSON.NextObject If the json string starts with [ => call JSON.NextArray
sktanmoy Active Member Licensed User Longtime User Jan 27, 2013 #5 Erel said: If the json string starts with { => call JSON.NextObject If the json string starts with [ => call JSON.NextArray Click to expand... I knew that but this made me confused. NextArray wasn't used there. There was an array only. Is that the reason? Upvote 0
Erel said: If the json string starts with { => call JSON.NextObject If the json string starts with [ => call JSON.NextArray Click to expand... I knew that but this made me confused. NextArray wasn't used there. There was an array only. Is that the reason?
Erel B4X founder Staff member Licensed User Longtime User Jan 27, 2013 #6 The string in that link starts with {. This means that the main object is a map. Upvote 0
sktanmoy Active Member Licensed User Longtime User Jan 27, 2013 #7 Erel said: The string in that link starts with {. This means that the main object is a map. Click to expand... There was [ also. Upvote 0
Erel said: The string in that link starts with {. This means that the main object is a map. Click to expand... There was [ also.
Erel B4X founder Staff member Licensed User Longtime User Jan 27, 2013 #8 Only the first character is important. Upvote 0
sktanmoy Active Member Licensed User Longtime User Jan 27, 2013 #9 Erel said: Only the first character is important. Click to expand... Great, got it :icon_clap: Upvote 0