How to consume JSON data in golang

  Рет қаралды 32,298

Hitesh Choudhary

Hitesh Choudhary

Күн бұрын

Пікірлер: 19
@gpiludu
@gpiludu 2 жыл бұрын
Thanks, Hitesh, this was very helpful coming from a 100% Javascript background. I was so confused why I couldn't automatically have JSON!
@8bitcoder731
@8bitcoder731 2 жыл бұрын
You are doing amazing job Hitesh, keep up the good work.
@ayushdedhia25
@ayushdedhia25 3 жыл бұрын
Hello hitesh sir, just wanna say you thank you for the tutorials 😊😀 I'm loving it 🔥
@LiveOverStrong
@LiveOverStrong 2 жыл бұрын
Hi Hitesh, You did a amazing job on this. But I'm missing one piece which is interface. Quite useful if you could explain in detail there. I've got so much explanations everywhere over the internet something like different shape area addition etc. But when I'm going from someone source code and if there is interface I'm not able to understand there and not able to reverse engineer in that, to understand what he is trying to do. So, if you could explain this in very simple way how to use the documentation for example ioWriter or other methods which are using it, in our code could be clear our doubts and helpful for everyone. As with the interface you could use OOPs like concept and concise your code. So, I'm requesting you to create a video on this. I'm really enjoying and learning from your Go video series which is adding new knowledge.
@sivareddyuppathi4828
@sivareddyuppathi4828 3 жыл бұрын
What are the extenrions u r using for vs code.. please do a video on that...
@kadir_keles
@kadir_keles 2 жыл бұрын
You skipped a very important topic there. var lcoCourse course definition style is new to users and deserves further explanation. var lcoCourse course is same as var lcoCourse = course{}. From what I understand, we create here an instance of the course struct that was defined earlier. Yet, this instant is updated once the Unmarshal function is called and &lcoCourse is used. So, lcoCourse in this scenario is mutable (can be changed) Another very important note: var lcoCourse = course{} is completely different than var lcoCourse = []course{}. The second one is creating a new method from my research that is immutable (cannot be changed). Therefore we use course{} here. Feel free to try it yourself and also print the lcoCourse before and after Unmarshal is applied. You will see the difference. I hope Hitesh will explain this in details in upcoming classes.
@higiniofuentes2551
@higiniofuentes2551 9 ай бұрын
Thank you for this very useful video!
@istiakhemon
@istiakhemon 2 жыл бұрын
Simply use file, _ := os.ReadFile("something.json") jsonData := []byte(file) fmt.Println(json.RawMessage(jsonData))
@fadygamilmahrousmasoud5863
@fadygamilmahrousmasoud5863 2 жыл бұрын
i think i am going to love golang ..
@higiniofuentes2551
@higiniofuentes2551 9 ай бұрын
I don't understand the fact if I was declared as int and the answer is float64, why declare as int? Because you said is Golang's decision? Thank you!
@mdahsankhan4361
@mdahsankhan4361 3 жыл бұрын
An off topic question ...i know c++ and would like to get into android should i learn java first or kotlin?..
@saikalyan1876
@saikalyan1876 3 жыл бұрын
How to consume json data of more than record anyone have any idea i tried to make using for loop but getting error while iterating the byte slice.
@gpiludu
@gpiludu 2 жыл бұрын
If you are getting data from an API or something, you may have to do a type assertion to get the data from the unmarshaled JSON. Otherwise you will get an error about interfaces being non-indexed. There are many couple good videos on KZbin if you search Golang type assertion.
@soniapaul288
@soniapaul288 3 жыл бұрын
Sometimes the video screen becomes fade, it happened for an old golang video as well. I know it is not my internet issue or my eye sight. Please look into it, can be video quality.
@kwizerasam7
@kwizerasam7 3 жыл бұрын
Thank you
@mujtabam265
@mujtabam265 3 жыл бұрын
sir please update the playlist on LCO.
@nibrasmuhammed5105
@nibrasmuhammed5105 2 жыл бұрын
please upload interfaces in golang.
@rishiraj9131
@rishiraj9131 3 жыл бұрын
Namaste 🙏
@trailblazer_nomad
@trailblazer_nomad Жыл бұрын
What? You said "we don't want to convert it to a String because we want to consume it as JSON" And what is JSON? JSON is purely a string with a specified data format so please, for the love of God, don't stop teaching people bullshit.
A long video on MOD in golang
27:16
Hitesh Choudhary
Рет қаралды 37 М.
How to create JSON data in golang
15:44
Hitesh Choudhary
Рет қаралды 29 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
So Cute 🥰 who is better?
00:15
dednahype
Рет қаралды 19 МЛН
Try this prank with your friends 😂 @karina-kola
00:18
Andrey Grechka
Рет қаралды 9 МЛН
Go Programming - JSON Encoding & Decoding in Golang
25:04
BugBytes
Рет қаралды 11 М.
Изучаем Golang. Урок 15. Работа с JSON
44:15
The Art of Development
Рет қаралды 19 М.
How To Build And Structure A JSON API Project In Golang!?
23:23
Anthony GG
Рет қаралды 13 М.
Building A Cat Fact JSON API With MongoDB And Golang
18:38
Anthony GG
Рет қаралды 13 М.
This Is The BEST Way To Structure Your GO Projects
11:08
Melkey
Рет қаралды 89 М.
Advanced JSON Handling in Go
29:33
Boldly Go
Рет қаралды 12 М.
Golang pointers explained, once and for all
13:49
JamieGo
Рет қаралды 10 М.
SQLC in Go - Auto-Generating Database Code in Golang
32:02
BugBytes
Рет қаралды 16 М.
Go - SQL Databases in Golang with the database/sql package
31:16
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН