JSON syntax
JSON syntax rules
- Data is in name/value pairs
- Data is separated by commas
- Curly braces hold objects
- Square brackets hold arrays
"My name" : "Sanjeev"
{
"name" : "Sanjeev",
"age" : "29",
"registration number" : "1628634"
}
{
"name" : "Sanjeev",
"age" : "29",
"registration number" : "1628634"
}
[
{
"name" : "Sanjeev",
"age" : "29"
},
{
"name" : "Ranju",
"age" : "25"
},
{
"name" : "Anand",
"age" : "16"
},
{
"name" : "Richa",
"age" : "20"
}
]
- A name/value pair consists of
a field name or key (in double quotes),
followed by a colon,
followed by a value.
{ "name" : "Sanjeev" }
Types of Values in JSON
In JSON, values must be one of
the following data types:
- a string (Strings in JSON must be written in double quotes) {
"age" : "27"
}
- a number {
"age" : 27
}
- an object (JSON object) {
"age" : { "original" : "27",
"fake" : "26" }
}
- an array {
"age" : [ {"original" : "27", "fake" : "26"},
{"original" : "20", "fake" : "24"},
{"original" : "88", "fake" : "78"}
]
}
- a boolean {
"age" : true
}
- null {
"age" : null
}
JSON Files
- The file type for JSON files is ".json "
- The MIME type for JSON text is
"application/json"
Use in Sketchware
- Json Object can be converted to Map Variable using the block Json... to Map
- Json Array can be converted to Map List using the block Json... to ListMap
nice tut
ReplyDeleteInstead of passing json keys to list map, how can I pass json keys Data to map and get this key Data to list string in spinner without these signs? Example: json =[{"key":""good":"number":9:}] in spinner
DeleteGood
9?
I'm spinner
help ho decode this json:
ReplyDelete{"response":[{"uid":23euE7002wefTFtud5e6yuyt3476ruj86,"name":"Lindsey","age":23}]}
[
Delete{
"uid":"23euE7002wefTFtud5e6yuyt3476ruj86",
"name":"Lindsey",
"age":"23"
}
]
Nice tut
ReplyDeleteHow can receive json from Google blogger API
Please help us
In case I would like an external editor to prepare the json file, where would I find it? Is it accessible using file explorer?
ReplyDeleteThank you! You are amazingly generous with your knowledge. I can only imagine what a great thing Sketchware would be if you were the developer instead of the irresponsible people who created it.
ReplyDeleteThis information is so important but I had no idea what it was at all until I saw this post.
Again, thank you very much!
Please,am actually working on software which i'm using sketchware to develop. so , the part of the logic is I'm to have a listMap you know dat would contains set of objects with their different variables. So, i want to know how i can be adding another object to the listMap in such a way that the new object would target a particular existing object of that listMap and making its datas to replace all d similar keys in dat existing object......
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHow can I decode the posts object:
ReplyDelete{
"kind": "blogger#blog",
"id": "2405240931534618827",
"name": "Saifiyo Diary",
"description": "",
"published": "2019-07-21T11:40:09+06:00",
"updated": "2019-08-02T17:18:14+06:00",
"url": "http://saifiyo.blogspot.com/",
"selfLink": "https://www.googleapis.com/blogger/v3/blogs/2405240931534618827",
"posts": {
"totalItems": 10,
"selfLink": "https://www.googleapis.com/blogger/v3/blogs/2405240931534618827/posts"
},
"pages": {
"totalItems": 0,
"selfLink": "https://www.googleapis.com/blogger/v3/blogs/2405240931534618827/pages"
},
"locale": {
"language": "en",
"country": "",
"variant": ""
}
}
It is a json object which contains some keys whose values are Strings and some keys whose values are json objects.
DeleteThis video will help you https://youtu.be/z2BCzl-RR7o
I followed your video. But it showing errors.
DeleteCan you give me the code to decode the posts object?
DeleteHow can I create a search function on a json file, with objects?
ReplyDeleteExcellent idea!!! I really enjoyed reading your post. Thank you for your efforts . Share more like this.
ReplyDeleteDot Net Training in Anna Nagar
Dot Net training in T Nagar
Java course in Tambaram
Selenium Training in T nagar
RPA Training in Anna Nagar
Graphic Design courses in Porur
Python Training in Tambaram
Android Training in Anna Nagar
Python course in Tambaram
Web Designing Course in Porur
Salesforce Training in Chennai
Bro how to delete json item
ReplyDeletehow to resolve this part
ReplyDelete"content": "\u003cdiv class=\"separator\" style=\"clear: both; text-align: center;\"\u003e\u003ca href=\"https://1.bp.blogspot.com/-szfVemeQeqk/XtdT7NnManI/AAAAAAAAAeI/kjBr5GnUa4sCGOO4P_EvjT7ZfgZvEY_8gCK4BGAsYHg/IMG_20200523_095258_4%257E2.jpg\" imageanchor=\"1\" style=\"margin-left: 1em; margin-right: 1em;\"\u003e\u003cimg border=\"0\" data-original-height=\"2775\" data-original-width=\"2899\" src=\"https://1.bp.blogspot.com/-szfVemeQeqk/XtdT7NnManI/AAAAAAAAAeI/kjBr5GnUa4sCGOO4P_EvjT7ZfgZvEY_8gCK4BGAsYHg/s320/IMG_20200523_095258_4%257E2.jpg\" width=\"320\" /\u003e\u003c/a\u003ethis is body\u003c/div\u003e",
please help
PLEASE HELP ME IN SKETCHWARE
ReplyDeleteplease i want to read json response {"id": "XXX", "user":"stringuser"} from url so i display it in view text
and save one of the json keys as string
url example = "https://WWWW/yyyyyy?id=XXX"
need to have the response and get the json keys the url every time changing the id XXX and do same thing according to list of ids XXX
and the post request have headers
'Accept': 'application/json'
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
Pls help me
ReplyDeleteHow can I add image file in json in sketchware.
waw... very nice bro. thank thanks thanks.. muachh... you has been fix my problem
ReplyDeleteYour article is good to understand, are you interested in doors and windows? Our service is helpful to you.
ReplyDeleteModern aluminium doors in chennai
Best Aluminium Windows in Chennai
upvc ventilator window in Chennai
Before into JSON syntax and Masters Dissertation Writing Services, I would like to know whether I can use this syntax with Java or Python.
ReplyDeleteMmorpg oyunları
ReplyDeleteinstagram takipçi satın al
tiktok jeton hilesi
tiktok jeton hilesi
antalya saç ekimi
INSTAGRAM TAKİPÇİ SATİN AL
instagram takipçi satın al
Mt2 Pvp Serverlar
instagram takipçi satın al
kadıköy arçelik klima servisi
ReplyDeletetuzla vestel klima servisi
tuzla bosch klima servisi
tuzla arçelik klima servisi
üsküdar vestel klima servisi
tuzla toshiba klima servisi
tuzla beko klima servisi
çekmeköy lg klima servisi
çekmeköy alarko carrier klima servisi