How to consume JSON data in golang

preview_player
Показать описание
Welcome to a youtube channel dedicated to programming and coding related tutorials. We talk about tech, write code, discuss about cloud and devops. That’s what we do all day, all year. We roll out a lot of series and videos on our channel.

All the learning resources such as code files, documentations, articles and community discussions are available on our website:

You can find our discord link, github link etc on the above website.

Рекомендации по теме
Комментарии
Автор

Thanks, Hitesh, this was very helpful coming from a 100% Javascript background. I was so confused why I couldn't automatically have JSON!

gpiludu
Автор

Hello hitesh sir, just wanna say you thank you for the tutorials 😊😀 I'm loving it 🔥

ayushdedhia
Автор

You are doing amazing job Hitesh, keep up the good work.

bitcoder
Автор

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.

LiveOverStrong
Автор

What are the extenrions u r using for vs code.. please do a video on that...

sivareddyuppathi
Автор

Simply use
file, _ :=
jsonData := []byte(file)

istiakhemon
Автор

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.

soniapaul
Автор

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.

saikalyan
Автор

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.

kadir_keles
Автор

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!

higiniofuentes
Автор

sir please update the playlist on LCO.

mujtabam
Автор

An off topic question ...i know c++ and would like to get into android should i learn java first or kotlin?..

mdahsankhan
Автор

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.

trailblazer_nomad