JSON, not Jason - Computerphile

  Рет қаралды 220,391

Computerphile

Computerphile

Күн бұрын

Understanding one of the most commonly used methods of transferring data from one machine to another.
/ computerphile
/ computer_phile
This video was filmed and edited by Sean Riley.
Computer Science at the University of Nottingham: bit.ly/nottscomputer
Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharan.com

Пікірлер: 447
@chrzan9608
@chrzan9608 5 жыл бұрын
I think that it is also worth mentioning that JSON is easily read by humans, which is something that isn't mentioned and this fact is a very important aspect of its popularity.
@likwidmocean
@likwidmocean 5 жыл бұрын
It's gotta be, since you're not able to comment. As usual it's, Horses for courses. It's great to have a small, unstructured, and browser friendly option like JSON, but when the use case shifts to the composition of large complex documents from multiple sources, and metadata collection, XML is worth it's bulk.
@chrzan9608
@chrzan9608 5 жыл бұрын
@@likwidmocean Oh for sure, its the same as using dynamic types vs static types in a language for a corporate project level. The former is nice, but quickly looses its value when you deal with thousands of lines of code.
@crooked8168
@crooked8168 3 ай бұрын
And it's also slow ; but yes, you're comment is 100% correct
@SergeMatveenko
@SergeMatveenko 5 жыл бұрын
JSON is not just ASCII. It accepts the entire UTF-8 encoding and requires it from decoders in its spec.
@JochemKuijpers
@JochemKuijpers 5 жыл бұрын
Strictly speaking JSON can be parsed as ASCII since all syntax characters are ASCII. String parsing can be done separately; the string itself is UTF-8 encoded, but escape sequences have to be handled first, and the unicode escape sequences are actually UTF-16 encoded. So it's kind-of a messy format in that sense.
@SergeMatveenko
@SergeMatveenko 5 жыл бұрын
@@JochemKuijpers yeah, if you even skip parsing keys which could contain any utf-8 character as well then it could be parsed as ascii. But what is the point if you cannot parse the data?:)
@keksmlg
@keksmlg 5 жыл бұрын
They just said ASCII instead of plaintext, boohoo. Don't waggle your exotic encoding knalij on our faces, you and the people that liked this :')
@MladenMijatov
@MladenMijatov 5 жыл бұрын
He frequently gives wrong information so that's to be expected. I wouldn't want him as my professor. He spends most of the time talking about irrelevant things and drawing poor explanations. If you showed 5:07 to anyone and ask them what is written there, you'd be happy to get confused look. In short this video could have been simpler, shorter and better explained.
@user-qf6yt3id3w
@user-qf6yt3id3w 5 жыл бұрын
@@MladenMijatov Whoosh! The sound a swinging pedant makes.
@MrLissu95
@MrLissu95 5 жыл бұрын
From the title, I thought this video would consist of pronunciation advice
@victoranem
@victoranem 5 жыл бұрын
me too
@andylib
@andylib 5 жыл бұрын
Yup same
@taureon_
@taureon_ 5 жыл бұрын
WaysToSaySame.json
@BarthiArgento
@BarthiArgento Жыл бұрын
😂
@Shadow81989
@Shadow81989 5 жыл бұрын
"Children tend to be an ordered collection" is probably my favourite sentence. :-)
@alephii
@alephii 5 жыл бұрын
The video really ends at 0:25
@Nick-kb2jc
@Nick-kb2jc 5 жыл бұрын
😂😂😂
@abhishekshah11
@abhishekshah11 5 жыл бұрын
I felt the same
@sammbci
@sammbci 5 жыл бұрын
I only clicked because the title made it sound like he was gonna insist it's pronounced J S O N
@joeytje50
@joeytje50 5 жыл бұрын
@@sammbci me too, so I feel kind of ripped off for my time...
@iabervon
@iabervon 5 жыл бұрын
He missed three values: true, false, and null. This is mainly notable because he otherwise covered absolutely everything you can represent in JSON. The nice thing about it is that it can represent enough structures to be useful and can't represent anything strange or subtle, which minimizes the chance that you'll have bugs in parsing.
@Cur8or88
@Cur8or88 5 жыл бұрын
What's the joke about XML? It's a format that can't be read by people or machines.
@KuraIthys
@KuraIthys 5 жыл бұрын
And yet XML is a 'simplified' form of SGML created precisely because SGML had exactly that problem.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
At least XML allows comments.
@Diggnuts
@Diggnuts 5 жыл бұрын
As a way to define a data struct, I find XML pretty solid. But as a format to interface with, indeed it is terrible.. therefor XML2JSON !
@psylock524
@psylock524 5 жыл бұрын
@@lawrencedoliveiro9104 .jsonc for that, or YAML
@beskamir5977
@beskamir5977 5 жыл бұрын
@@lawrencedoliveiro9104 Yea... the lack of comments in json kind of ruined it for me so I prefer to use ini files since usually that's all I need.
@harisiqbalralph
@harisiqbalralph 5 жыл бұрын
"Your children are a list of strings" Personally, I would prefer them to be pointers.
@Jet-Pack
@Jet-Pack 5 жыл бұрын
NULL pointers as long as they are not born?
@CTde110
@CTde110 5 жыл бұрын
Or children pointers? lol
@the-mush
@the-mush 5 жыл бұрын
actually, only your dog could be a pointer
@KuraIthys
@KuraIthys 5 жыл бұрын
@@Jet-Pack wouldn't that mean knowing in advance how many children you'll have in future?
@PhoenixD
@PhoenixD 5 жыл бұрын
@@KuraIthys i'd go with a linked list of structs, with one element being a pointer to a string. You can even allocate that without wasting memory since you should decide their name before they are actually born! Only problem with that is when you free(myself) the reference to them will be lost, but still... That's a problem of whoever will have to upkeep the code :D
@RobertMilesAI
@RobertMilesAI 5 жыл бұрын
JSON has exactly two problems: 1. No support for comments 2. A comma after the last item in an array or object is a syntax error Both of these cause problems when manually editing JSON files, which I know isn't what JSON was designed for, but it would be so easy to fix. Maybe I should file an RFC
@Okabim
@Okabim 5 жыл бұрын
Also the ability to disregard the quotation marks in some places like JS allows like {one:"Something"} instead of {"one":"Something"}
@MladenMijatov
@MladenMijatov 5 жыл бұрын
Hah, I can feel you brother. So many Ansible scripts have caused an invalid configuration files for me just because I forgot that last comma is considered syntax error. Lack of comments is not so much of an issue in communication, but when writing configuration files it is nice to have them. Both are, like you said, easy fixes but they will never happen, too many integrations would need to be updated.
@haulin
@haulin 5 жыл бұрын
There is a newer format called JSON5 that addresses all of those issues. Basically bringing JSON to ECMAScript5+ world. Identifier names without quotes, single quotes around strings, trailing commas, comments, hex numbers, ...
@noxabellus
@noxabellus 5 жыл бұрын
1. CJSON exists
@killymxi
@killymxi 5 жыл бұрын
Jonathan Crowder one of the issues with "__comment" field is when the system using this JSON document also has the document schema to check it against, and it starts to complain about unknown field...
@LeonardChurch33
@LeonardChurch33 5 жыл бұрын
JSON is one of those things in the programming tool box that made me feel really powerful the first time I picked it up. Up to that point I had been taught to either write all my program data out in a csv file, exporting and parsing "by hand" or use the pre-written SQL queries I'd been given to interact with a database. Having the ability to quickly pull data in and out of my program as whole objects without having to worry about how it was being written or whether all the control breaks were happening in the correct order made me feel untouchable.
@hattrickster33
@hattrickster33 5 жыл бұрын
I got the same feels but with integration. Literally getting data that your app can use just like that, directly from Google's servers is a pretty powerful thing. Same goes for integration with Facebook, Twitter, Instagram, etc. I couldn't believe how easy it was the first time. Really makes you appreciate abstraction.
@Qbe_Root
@Qbe_Root 5 жыл бұрын
2:20 “This value can be any other JavaScript thing” except a Function, a Symbol, a RegExp, a Date, undefined, null (except in arrays), Infinity, NaN…
@slash_me
@slash_me 5 жыл бұрын
null is a always a valid value, not just in arrays
@Qbe_Root
@Qbe_Root 5 жыл бұрын
@@slash_me oh, my bad
@NatoNathan
@NatoNathan 5 жыл бұрын
I think he meant any JavaScript primitive.
@Qbe_Root
@Qbe_Root 5 жыл бұрын
@@NatoNathan Symbol and Undefined are primitive types, and Infinity and NaN are primitive values, yet none of them exist in JSON
@NatoNathan
@NatoNathan 5 жыл бұрын
my, bad forgot about those.
@NoamSilvy
@NoamSilvy 5 жыл бұрын
JSON is a great topic! 👏👏👏There are so many things to talk about around it: - jsonb - links to other JSON objects (instead of nesting everything in place) - JSON Schema - JSON API - JSON and Web Semantic - JSON-LD It would be great to beginning a series around this :)
@alimahdi6379
@alimahdi6379 5 жыл бұрын
Now we know the true identity of JSON Bourne.
@DontTalkShite
@DontTalkShite 5 жыл бұрын
You should have shown a prettyprint on-screen example. I work with JSON quite a lot and those sketches we're a bit all over the place.
@madeso
@madeso 5 жыл бұрын
Great introduction, but a few errors: Javascript and json have as much in common as java and javascript. JSON is inspired by javascript. It doesn't use the same parser. A javascript interpreter probably exposes a json api too, and stores the binary representation in the same way, but they are not the same. If your javascript is using the javascript parser to parse json, you are open to attack. In json, the strings are also not required to be unique, so it is not the same as a associative array. Any standard compatible parser however is allowed to place additional requirements, so most implementations ignore this fact. Javscript is not lightweight. It is lighter than some other text formats, but heavier than other text formats. It is also a lot heaver than binary formats such IFF/RIFF.
@okie9025
@okie9025 5 жыл бұрын
Jsonis based on javascript it's literally in the name...
@madeso
@madeso 5 жыл бұрын
@@okie9025 While it's true that it is based on a small subset of javascript, it is such a small subset and it makes changes to how you can use it, that it's basically inspired by it. In javascript, for example, you can have comments, in json you cannot. In json the string key in a object is not required to be unique, in js/chrome it ignores everything but the last.
@okie9025
@okie9025 5 жыл бұрын
@@madeso in every way (except properties having to be strings), a json item is the same as a javascript object
@madeso
@madeso 5 жыл бұрын
@@okie9025 so that's 2 exceptions for the object, no comments=3, json doesn't support functions=4, it's starting to have more things that are not javascript than things that are.
@okie9025
@okie9025 5 жыл бұрын
@@madeso functions are different for every language and are this compiled in different ways also comments are not needed in a storage file, even SQL has very limited support for comments that only work in actual SQL queries
@eschelon9067
@eschelon9067 5 жыл бұрын
So Jason Derulo's full name is actually Java Script Object Notation Derulo?
@MyTokyodrift
@MyTokyodrift 5 жыл бұрын
Indeed.
@JohnnyWednesday
@JohnnyWednesday 5 жыл бұрын
Terrible jokes like these? are like a warm crackling fire for a geek - never, ever stop.
@31redorange08
@31redorange08 5 жыл бұрын
No, notice the *a* in J*a*son?
@hattrickster33
@hattrickster33 5 жыл бұрын
Yes.
@EdwardForgacs
@EdwardForgacs 5 жыл бұрын
JSON Derulo
@theepicslayer7sss101
@theepicslayer7sss101 5 жыл бұрын
you see a lot of JSON files in games nowadays. i guess it is easier to change the settings of things when they are defined clearly in human readable form and do not need compiling to be used.
@grn1
@grn1 2 жыл бұрын
A lot of programs (games or otherwise) will have an INI or CONF file which I prefer for settings. Not sure if JSON has any real advantage over that.
@bytefoundry8702
@bytefoundry8702 5 жыл бұрын
JSON Derulo uses the same notation when composing his songs
@MilanVVVVV
@MilanVVVVV 5 жыл бұрын
*The numbers, JSON, what do they mean??*
@IBAction
@IBAction 5 жыл бұрын
Number: a signed decimal number that may contain a fractional part and may use exponential E notation, but cannot include non-numbers such as NaN. The format makes no distinction between integer and floating-point.
@aleksakocijasevic6613
@aleksakocijasevic6613 3 жыл бұрын
Lol
@sid98geek
@sid98geek 3 жыл бұрын
5:13 to 5:20: "It is used for transferring data in a way that is pretty much _agnostic_ to the programming language being used." That was a beautiful and figurative way to use the word "agnostic"!
@MartilloB
@MartilloB 5 жыл бұрын
Plz do a video on the limitations of JSON (or other human-readable formats) or JSON vs. XML!
@al20ov87
@al20ov87 5 жыл бұрын
I've used json to represent a graph for a decision tree pretty recently, and I gotta say it works very well for that kind of application
@stanisawszostak8065
@stanisawszostak8065 4 жыл бұрын
since i'm pretty much a newbie at programming, i'd love to hear from you how exactly you managed to do that, would you mind?
@snozzmcberry2366
@snozzmcberry2366 5 жыл бұрын
JSON is delightful to work with. So clean, concise & easily pars..e..able? I love it.
@snozzmcberry2366
@snozzmcberry2366 5 жыл бұрын
@Kevin Oh that is just *beautiful*
@nicholasbrownlee4209
@nicholasbrownlee4209 5 жыл бұрын
So Alice and Bob are, in fact, friends with JSON?
@nicholasbrownlee4209
@nicholasbrownlee4209 5 жыл бұрын
@@neminem1203 True. Adam can verify this fact.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
But will they help him find the Golden Fleece?
@109Rage
@109Rage 3 жыл бұрын
There are of course other data exchange formats that are agnostic to the application they're used in, and fairly human readable, such as YAML. I think the reason JSON is preferred is because the way it declares data types is more intuitive to programmers, as strings must be declared in quotes, numbers are always bare, arrays are in square brackets, and so on... I've used YAML several times, and while it's nicer to look at for something like a config file, half the time I forget the syntax for everything in it.
@python-programming
@python-programming 2 жыл бұрын
This is another great Computerphile video! I've got a video series on JSON if anyone wants to learn about using it via Python.
@kisame_5331
@kisame_5331 5 жыл бұрын
JSON at home: Jason
@gregoriysharapov1936
@gregoriysharapov1936 5 жыл бұрын
"Jason's JSON."
@myhumblebeginnings
@myhumblebeginnings Жыл бұрын
I am looking a journal which hosts papers from the early beginning of computer science. Can anyone help me on this matter? Thank you very much in advance.
@freegracetoronto3876
@freegracetoronto3876 5 жыл бұрын
do you still use a tractor feed printer, or are you still using out all the tractor feed paper you had left over from 30 years ago?
@thomasl863
@thomasl863 2 жыл бұрын
I’ve always wondered- what’s the type of paper that he’s writing on? I keep seeing it in Computerphile vids
@SergeMatveenko
@SergeMatveenko 5 жыл бұрын
I'd expect to hear the word "serialization" at least once in this video. Let's go deeper and speak about BSON, Protobuf, CBOR, and etc then? Lightweight is a bold statement without comparison to alternatives. Just compare JSON and CBOR datagram sizes for the same data. You'll notice that CBOR produces much lighter data sizes.
@sebastianpopa7943
@sebastianpopa7943 5 жыл бұрын
Dude chill out.
@SergeMatveenko
@SergeMatveenko 5 жыл бұрын
@@sebastianpopa7943 the thing is that there are a lot of people out there who will watch this and remember it like it was said in the video.
@sebastianpopa7943
@sebastianpopa7943 5 жыл бұрын
@@SergeMatveenko I see your point . But this is barely a preview/presentation to JSON. Computer scientists who'll actually work with JSON will anyway dive deeper for more information and for a non-programmer this is the most "human" way to introduce JSON. So everyone is safe . (sorry for bad english)
@DaveSohan
@DaveSohan 5 жыл бұрын
This is the 'What is JSON?' video for people who don't actually know what JSON is and it's doing a really good job at that.
@Vextrove
@Vextrove 5 жыл бұрын
@@sebastianpopa7943 he's not even angry. Don't tell people to chill out if they're not angry
@Keex11
@Keex11 5 жыл бұрын
How does it handle data types? Is "value": "42" the string 42 or the number 42?
@icedragon769
@icedragon769 5 жыл бұрын
just like in javascript, quotes mean strings, no quotes means numbers.
@monumento.f.501
@monumento.f.501 5 жыл бұрын
solidly equipped with older gear for data recovery, properly placed at the windows.
@prashank
@prashank 5 жыл бұрын
what type-c dongle is that
@TorBruheim
@TorBruheim 4 жыл бұрын
Is there any reason why you don't present the name of the guy in this particular video?
@muche6321
@muche6321 5 жыл бұрын
2:45 Regarding arrays, it is possible to represent arrays as general objects, i.e. ["Alice", "Bob", "Charlie", "Derek", "Esmeralda"] could be represented as {"1": "Alice", "2": "Bob", "3": "Charlie", "4": "Derek", "5": "Esmeralda"}. Of course, the disadvantage is, it introduces issues like possibility of noncontinuous indices, 0/1-based indexing mixups, index transformations (string vs. integer) etc. that objects allow, so an object would need to be checked (upon reading the JSON) if it is indeed an array and/or stripping it of non-array features.
@dealloc
@dealloc 5 жыл бұрын
Those are still separate data types. One is indexed while the other is a hash. They are not equivalent because the index in Arrays are integers, whereas keys in objects are strings. So you'd have to coerce the key before it could be used interchangeably (in JavaScript). Even worse for other languages that parses JSON, is that the deserialized data types are different and would need further serialization to become compatible with one another.
@Jarvo98
@Jarvo98 5 жыл бұрын
I haven't realized until now that computerphile's videos start with the xomputerphile tag and ends with the closing tag.
@Computerphile
@Computerphile 5 жыл бұрын
not all... :) >Sean
@Kihidokid
@Kihidokid 5 жыл бұрын
PRESS "X" TO "JSON" JSON JSON JSON JJJJJSOOOOONN
@itskdog
@itskdog 5 жыл бұрын
Anthony Ingram I get the reference there...
@XxJKLTVxX
@XxJKLTVxX 5 жыл бұрын
}}}}}]}}}]}}}]}}}}}}]}}]}}}}
@iLiokardo
@iLiokardo 5 жыл бұрын
The file has been stolen.
@X_Baron
@X_Baron 5 жыл бұрын
It's called serialization. A program has some data (or code) in memory but dumping the contents of the memory wouldn't produce a usable format to store the data and then read back. You need some kind of representation for it, that is easy to read and parse. Creating such a format for every use case separately is a waste, so it's often better to use some preexisting serialization library to do it.
@scottfranco1962
@scottfranco1962 5 жыл бұрын
In this day and age, where the heck did you find tractor fed greenbar????
@sogerc1
@sogerc1 5 жыл бұрын
No video is good without Alice and Bob!
@RussTrotter
@RussTrotter 5 жыл бұрын
didn't JSON come about as a response to XML in that you could do "var data = eval(...);" on it and let the JS parser do the work for you? obviously the security implications won the day and JSON.stringify/JSON.parse came about, but I thought it was born out of that ad-hoc convenience.
@pfefferle74
@pfefferle74 5 жыл бұрын
JSON as data exchange method became popular since Javascript had no built-in way to parse XML data and dumping out complex data to the browser as directly parsable JS code was simply the easiest method. Programmers also like it for making a clear distinction between numeric values and text strings, which XML doesn't.
@MladenMijatov
@MladenMijatov 5 жыл бұрын
I don't think so. Its primary purpose is structuring objects, considering JavaScript doesn't have concept of classes. At some point people just started using it for communication since serializing and reverting it back to object is pretty straight forward and it maintains structure you are using in your code anyway.
@morbidmanatee5550
@morbidmanatee5550 5 жыл бұрын
XML + XSD + JAX-B = Heaven. I so wish JSON had something similar (JSON schemas and Java API like JAX-B)
@tamasdemjen4242
@tamasdemjen4242 5 жыл бұрын
One possible solution for representing a graph (or a tree with optional parent references) is using an indexing system, because you cannot reference parent nodes directly. Let's see a UK road map: { "graph": [ { "city":"London", "roadTo":[1,2,3] }, { "city":"Bristol", "roadTo":[0] }, { "city":"Manchester", "roadTo":[1,2] }, { "city":"Nottingham", "roadTo":[4] }, { "city":"Liverpool", "roadTo":[1,3] } ] }; So London(0) has a road to Bristol(1), Manchester(2) and Nottingham(3). To get from London(0) to Liverpool(4), you have to connect in Nottingham(3). graph[0] is the root node of the graph.
@zenawarrior3012
@zenawarrior3012 5 жыл бұрын
Love your videos. Can you guys do one on wireshark? Or intrusion detection?
@trucid2
@trucid2 5 жыл бұрын
Next video: JSON vs XML
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
The _Alien vs Predator_ of data interchange formats!
@iii-ei5cv
@iii-ei5cv 5 жыл бұрын
@@lawrencedoliveiro9104 more like Avengers vs Justice League
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
@@iii-ei5cv Yes, but which John Steed sidekick? Tara King? Emma Peel? Cathy Gale? Or one of the older ones?
@hattrickster33
@hattrickster33 5 жыл бұрын
Different tools for different jobs.
@noxabellus
@noxabellus 5 жыл бұрын
No contest. XML is complete trash.
@GrandadIsAnOldMan
@GrandadIsAnOldMan 5 жыл бұрын
Anybody else get the JSON error message uploading thumbnails to KZbin with Chrome. Works fine with Edge and Firefox and just another example of KZbin's impressive enhancements since focusing on the Studio Beta fiasco.
@truezulu
@truezulu 5 жыл бұрын
How did this have anything to do with JSON?
@LivvieLynn
@LivvieLynn 5 жыл бұрын
I can't imagine anyone watching this channel and wondering what JSON is.
@trapper1211
@trapper1211 5 жыл бұрын
and yet here i am
@baltakatei
@baltakatei 5 жыл бұрын
I just want to know who this JSON is and why he keeps breaking my stuff.
@FuzailShaikh
@FuzailShaikh 5 жыл бұрын
Can we have a video about gRPC?
@TheAstronomyDude
@TheAstronomyDude 5 жыл бұрын
How do you read an element in JSON? Say I want to know the name of Alice's third Kid. How would I find him if there are no indices?
@sensiblewheels
@sensiblewheels 5 жыл бұрын
For any such indexing requirements, JSON on its own won't suffice. It's only a way to describe relationships and what not. You will need a NoSQL engine working on top of this data , which then creates index's and what not.
@okie9025
@okie9025 5 жыл бұрын
You can JSON.parse() and then index it like a normal JS object
@Diggnuts
@Diggnuts 5 жыл бұрын
Depends on what you mean by "third". The 3rd that exists in the data? the third that was born? The 3rd best liked? You can easily traverse a tree, directly look up the n'th instance or search by key.
@alexeimakes
@alexeimakes 5 жыл бұрын
awesome video!
@toasty8432
@toasty8432 5 жыл бұрын
You know you're a fossil when you mention a Sun workstation...
@themistoclesnelson2163
@themistoclesnelson2163 3 жыл бұрын
Thanks for the video!
@cacheman
@cacheman 5 жыл бұрын
JSON is almost good. It should have been specified to allow trailing commas though.
@hrbattenfeld
@hrbattenfeld 5 жыл бұрын
The fact that there is a dispute about this is an argument against the entire concept of using anthropocentric data structures to transfer data between machines.
@AlaaZorkane
@AlaaZorkane 5 жыл бұрын
+ if you indent with tabs, it doesn't parse
@hrbattenfeld
@hrbattenfeld 5 жыл бұрын
@Ark Osf Absolutely. Machines are infinitely better than humans at generating human-parsable code that is also machine-parsable. The rubegoldbergian insanity is that in a properly working program, none of this human-parsable code is ever going to be parsed by a human. It's a small miracle that cryptographic key exchanges aren't done in Roman numerals.
@Yaxqb
@Yaxqb 5 жыл бұрын
Tbh comments would be great as well
@dealloc
@dealloc 5 жыл бұрын
@@AlaaZorkane Both tabs and spaces are allowed outside of values, but needs to be escaped inside strings as `\t` for tabs and ` ` for newlines.
@MagicAndWires
@MagicAndWires 5 жыл бұрын
Solid end credits joke.
@IoDavide1
@IoDavide1 5 жыл бұрын
Json is usefull as well as a txt delimited file. No advantage of any sort to use that instead of a txt delimited or fixed, that's why most standard communication softwares do not use json but delimited text for interface functions. The reason is easy to understand, what is difficoult in data communications is not the format of the file containing the data, but the nature of the data transfered. So it doesn't matter if the data is transfered with plain text, json or xml, it is a question of what data is contained in the file.
@karolszymanowski518
@karolszymanowski518 5 жыл бұрын
How do you guys pronounce "json": json or json?
@bistmastr6737
@bistmastr6737 5 жыл бұрын
json
@karolszymanowski518
@karolszymanowski518 5 жыл бұрын
exactly
@e1nste1in
@e1nste1in 5 жыл бұрын
So how would I reference to an object that I already defined before? Eg. the second parent of a child.
@tamasdemjen4242
@tamasdemjen4242 5 жыл бұрын
JSON is purely a declarative language, you cannot put code in it. One thing you can do is to assign a unique id to each node, and then reference the node via its id. Later build an index where you can address objects by id, but you can only do it from code, it cannot be part of the data. For example: { "id":1, children: [ { id:2 }, { id:3 }, {id:4, parent:1 } ] }; That's how PDF does it as well.
@t.walker3101
@t.walker3101 5 жыл бұрын
Awesome, just using JSON for my iOS programming app project
@lebigsquare
@lebigsquare 5 жыл бұрын
Amiga 1000 behind the guy ? 👍
@DJDoena
@DJDoena 5 жыл бұрын
That it is not JaSON is the real tragedy here. What kind of computer person ignores such a pun when it's handed to them on practically a gold platter? The a isn't just convenient, it's right there in the spelled-out word. But then again, there is this English guy who took the longest sounding English letter in the alphabet and trippled it just to name something. :-P
@BoWeava
@BoWeava 5 жыл бұрын
DJDoena XD
@martinleduc
@martinleduc 4 жыл бұрын
Has Computerphile ever made a video about JSONP ?
@konstantinrebrov675
@konstantinrebrov675 5 жыл бұрын
Please make a video, or a series of videos about packet encodings, how data is sent in packets via a network, and how to build a packet sniffer!
@firefox21xl
@firefox21xl 5 жыл бұрын
Building a packet sniffer seems kinda out of scope for a computerphile video.... It's not simple in the slightest and definitely spills out of the 5-15 minute bites they normally put out.
@FortoFight
@FortoFight 5 жыл бұрын
SEAN!
@AdamHawkesDeveloper
@AdamHawkesDeveloper 5 жыл бұрын
Sun workstation? Might as well talk about the Atari ST.
@tagno25
@tagno25 5 жыл бұрын
I have a Sun workstation that I still use, though it is an amd64 based one.
@RedwoodRhiadra
@RedwoodRhiadra 5 жыл бұрын
Considering there *is* at least one functioning Atari ST in that room...
@_MagL
@_MagL 5 жыл бұрын
Since JSON could be used in multiple programming languages, isn't it time JSON gets a new name?
@1973Washu
@1973Washu 5 жыл бұрын
So? System agnostic code?
@j7ndominica051
@j7ndominica051 5 жыл бұрын
A config file in this format is very human readable in notepad without a syntax highlighter, almost as clear as an ini, perhaps even better because the structure is visually nested. An XML is almost impossible to read, and type all the repeated attributes for every value and symbols all with the right hand. Most XML was clearly never intended to be edited by people, but is still saved to disk in verbose text format.
@_MagL
@_MagL 5 жыл бұрын
So many computers in one room
@LordOfNihil
@LordOfNihil 5 жыл бұрын
i usually just write my own damn parser and call it a day. so long as you include the same header at both ends it works.
@frankhaugen
@frankhaugen 5 жыл бұрын
Sun? IBM? You might be living in the wrong decade mate ;-)
@autohmae
@autohmae 4 жыл бұрын
He probably works on supercomputers.
@pooryaj2092
@pooryaj2092 5 жыл бұрын
Do the PDF video please
@s8w5
@s8w5 5 жыл бұрын
I really wonder what the name of the 12th child would have been.
5 жыл бұрын
Lucas?
@sharpfang
@sharpfang 5 жыл бұрын
No standard-defined way to store binary data though. You may send an array of ints, or a base64-encoded string or a string of hex digits, but there's no native built-in way in Javascript to encode a binary segment.
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
You would store the structure that the binary data represented.
@sharpfang
@sharpfang 5 жыл бұрын
@@lawrencedoliveiro9104 So how'd you go about sending, say, a PNG image over JSON?
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
@@sharpfang Encode the chunks.
@sharpfang
@sharpfang 5 жыл бұрын
@@lawrencedoliveiro9104 So, first I take the PNG image from disk on the sender computer, decode it, disassemble into components, send them over JSON, including the image data as arrays of decimal values, then reassemble on the other end before displaying as a notification icon?
@lawrencedoliveiro9104
@lawrencedoliveiro9104 5 жыл бұрын
@@sharpfang Represent the entire structure of the file as JSON structure.
@AlphaFoxDelta
@AlphaFoxDelta 5 жыл бұрын
JSON is great for computing in general in my view, but is no replacement for RDBMSs #DataIntegrity #WhyWaitToWriteToDB Dr. B here even hinted at it if you caught it, when he remarked that it'd be interesting to see a graph like structure with a bunch of relationships to one another. That's where Relational Databases shine, foreign keys and all that. Plus the fact that in some NoSQL DB architectures you can wait to write data, not having to at the instant the operation is handled, which can lead to trouble with data integrity... all for fast benchmarks... which of course JSON offers with its universal and small "packets".
@M3t4lstorm
@M3t4lstorm 5 жыл бұрын
What? No.
@shurmurray
@shurmurray 5 жыл бұрын
Lightweight JavaScript: please ignore that 350+ Mb of RAM occupied by an instance of chromium to run me.
@karolszymanowski518
@karolszymanowski518 5 жыл бұрын
U can run js outside web browsers in node.js... besides he said json is lightweight not js (which actually is lightweight in mentioned nodejs).
@JohnnyWednesday
@JohnnyWednesday 5 жыл бұрын
Web browsers are really slow, bloated virtual machines. Node.js is lovely and it's 'fast' because it's essentially compiling the code before its run. You know what's even faster? A real language with a COMPILER. I'm sorry that BEtoN is so hard to type that everybody throws a ton of their compute resources in the bin.
@willtheoct
@willtheoct 5 жыл бұрын
@@JohnnyWednesday you can compile JS to machine code. JS is the real language and most others are frauds
@Concentrum
@Concentrum 5 жыл бұрын
​@@willtheoct r/gatekeeping
@JohnnyWednesday
@JohnnyWednesday 5 жыл бұрын
@@willtheoct - said exactly like an amateur coder that only knows javascript ;)
@Jsuwinski
@Jsuwinski 5 жыл бұрын
KISS, love it, too easy
@oaktwig
@oaktwig 5 жыл бұрын
You called?
@Nicolai0Nerland
@Nicolai0Nerland 5 жыл бұрын
JSON? JSON..? JSON!? JSON!
@512TheWolf512
@512TheWolf512 5 жыл бұрын
[X] JASON!
@Rouverius
@Rouverius 5 жыл бұрын
Yeah, that's what I said: Jason
@blunderchips
@blunderchips 5 жыл бұрын
I love json
@AnarKloot
@AnarKloot 5 жыл бұрын
What about Jason Schemer? Seem to hear a lot about that bloke these days
@bikutoso
@bikutoso 5 жыл бұрын
Two things I seem to use to frequently is JSON (Well, actually YAML in my case) and CSV.
@KaathKilo
@KaathKilo 5 жыл бұрын
No, it's Jason
@akiren7730
@akiren7730 5 жыл бұрын
React Redux uses Json to store States and its awsome ;)
@dealloc
@dealloc 5 жыл бұрын
Any state management library for JavaScript uses JSON to store state :) That is the fundamental of JavaScript, and what it's building blocks are (objects).
@akiren7730
@akiren7730 5 жыл бұрын
ui_wizard still awesome ;)
@BoWeava
@BoWeava 5 жыл бұрын
Where's my fellow Jason's? 🤗
@svavarkjarrval8757
@svavarkjarrval8757 5 жыл бұрын
The biggest crime against nostalgia is that Eve wasn't listed as one of the children.
@smergibblegibberish
@smergibblegibberish 5 жыл бұрын
Eve is classically the eavesdropper in the scenario involving an exchange from Alice (point A) and Bob (point B). Using the name Eve in the context of this video would be unfitting.
@svavarkjarrval8757
@svavarkjarrval8757 5 жыл бұрын
@@smergibblegibberish Yes, Eve would be the eavesdropping sibling. ;)
@schifoso
@schifoso 5 жыл бұрын
This explains how to increase sales for companies that make RAM and processors.
@frazer26
@frazer26 5 жыл бұрын
5:25. Proof 2pac is alive
@FandCCD
@FandCCD 5 жыл бұрын
Thank you! I need to know what JSON is.
@SergeMatveenko
@SergeMatveenko 5 жыл бұрын
I feel sarcasm:)
@FandCCD
@FandCCD 5 жыл бұрын
Serge Matveenko actually no, no sarcasm.
@SergeMatveenko
@SergeMatveenko 5 жыл бұрын
@@FandCCD Sorry, I felt like you're referring to the fact that this thing has been around for almost two decades already.
@FandCCD
@FandCCD 5 жыл бұрын
Serge Matveenko no prob. I’m new to the scene.
@JochemKuijpers
@JochemKuijpers 5 жыл бұрын
@@SergeMatveenko Something that "everyone knows" is new information to a lot of people every day
@freshleaf1231
@freshleaf1231 Жыл бұрын
DAMN JASON!
@callsignseth7679
@callsignseth7679 5 жыл бұрын
More like the most lightweight and human readable at the same time, you want lightweight, use protocol buffers. 10/10 with gRPC :)
@nnaaaaaa
@nnaaaaaa 5 жыл бұрын
ASN.1 DER is much more lightweight than protocol buffers, thankfully it doesn't matter either way because both are monstrosities of technology.
@cliffordkahn6830
@cliffordkahn6830 5 жыл бұрын
I'm deaf... and I need caption for this video.
@debangamedhi
@debangamedhi 5 жыл бұрын
It has captions
@noredine
@noredine 5 жыл бұрын
can we talk about why typeof [ ] == typeof { }
@dealloc
@dealloc 5 жыл бұрын
They are both objects in JavaScript, so it's true. All values in JavaScript. There are some primitive types like `number` and `string`, which values of those types resolves to when using `typeof`, but they are objects as well. All values has a prototype, which is inherited from Object's prototype. Another thing to notice is the use of == (loose equality) rather than === (strict equality). Loose equality converts types beforehand, so 1 == '1'. Whereas strict equality compares both the type _and_ the value, without type conversion, and therefore 1 !== '1'. If you wanted to check wether a value is an array and not an `object`, then use Array.isArray.
@GDNTB
@GDNTB 5 жыл бұрын
What about Jay’s son?
@alwysrite
@alwysrite 5 жыл бұрын
Esmerellda? ! what ever happened to Eve ? : )
@4pThorpy
@4pThorpy 5 жыл бұрын
If you can make video about JQuery and I actually enjoy it...you'll have done something truly amazing. There's not much I hate right down to my very core but JQuery is one of those things.
@RocketLR
@RocketLR 5 жыл бұрын
Every time I read json, my mind "the numbers, json. what do they mean!?"
@xybersurfer
@xybersurfer 5 жыл бұрын
"the numbers json"?
@RocketLR
@RocketLR 5 жыл бұрын
@@xybersurfer I corrected the sentances. Anyways, it's from CoD black ops. But He says Mason instead of json..
@xybersurfer
@xybersurfer 5 жыл бұрын
@@RocketLR oh, i see. then it makes sense that i don't recognize it
GUI Programming Introduction - Computerphile
10:32
Computerphile
Рет қаралды 204 М.
What is Big Data? - Computerphile
11:53
Computerphile
Рет қаралды 210 М.
La final estuvo difícil
00:34
Juan De Dios Pantoja
Рет қаралды 29 МЛН
The Worlds Most Powerfull Batteries !
00:48
Woody & Kleiny
Рет қаралды 23 МЛН
How I prepare to meet the brothers Mbappé.. 🙈 @KylianMbappe
00:17
Celine Dept
Рет қаралды 57 МЛН
Python Hash Sets Explained & Demonstrated - Computerphile
18:39
Computerphile
Рет қаралды 105 М.
Regular Expressions - Computerphile
17:19
Computerphile
Рет қаралды 238 М.
Lambda Calculus - Computerphile
12:40
Computerphile
Рет қаралды 1 МЛН
Is JSON Blazingly Fast or...?
9:57
ThePrimeagen
Рет қаралды 184 М.
How DNS Works - Computerphile
8:04
Computerphile
Рет қаралды 456 М.
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,1 МЛН
Multithreading Code - Computerphile
15:54
Computerphile
Рет қаралды 378 М.
Dealing with Dynamic Data - Computerphile
17:25
Computerphile
Рет қаралды 82 М.
JSON, I hardly know 'er
2:52
ThePrimeagen
Рет қаралды 181 М.
La final estuvo difícil
00:34
Juan De Dios Pantoja
Рет қаралды 29 МЛН