Parsing Json in Java Tutorial - Part 1: Jackson and Simple Objects

Parsing Json in Java Tutorial - Part 1: Jackson and Simple Objects

CoderFromScratch

4 года назад

116,717 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Ruqersa
Ruqersa - 05.10.2023 01:08

still worth it for eclipse ?

Ответить
Justin Douglas
Justin Douglas - 10.08.2023 21:00

hi im new to all of this but this code is giving me a error.
public class Json {

private static ObjectMapper objectMapper = getDefaultObjectMapper();
private static ObjectMapper getDefaultObjectMapper() {
ObjectMapper defaultObjectMapper = new ObjectMapper();

return defaultObjectMapper;
}

public static JsonNode parse(String src) throws IOException {
return ObjectMapper.readTree(src);
}
}

Non-static method 'readTree(java.lang.String)' cannot be referenced from a static context.

any help is appreciated

Ответить
Ragnar Lothbrok
Ragnar Lothbrok - 06.07.2023 15:22

Too complicated, overkill

Ответить
Sebastian F.
Sebastian F. - 12.06.2023 14:03

Nice tutorial, thank you dude

Ответить
Mayukh Bhattacharya
Mayukh Bhattacharya - 03.06.2023 17:07

Learned a lot

Ответить
Getachew Sharew
Getachew Sharew - 02.04.2023 20:46

Great thanks bro.

Ответить
Qibbs
Qibbs - 15.01.2023 08:23

The video really helped me out but I have one question. I'm able to parse the json when it looks like
{
"title":Coder from Scratch
}
but if the json looks like
{
"titles: [
{
"title1": Coder From Scratch
"title2": CoderFromScratch
}
]
how would I be able to print title1 title2? (oh and sorry if the json isn't formatted correctly, I'm still a bit new to this stuff)

Ответить
Ibrahim Othman
Ibrahim Othman - 16.12.2022 23:36

can't I use intellij builder ?

Ответить
ThatsDeep
ThatsDeep - 10.10.2022 02:15

Thank you for speaking english

Ответить
Marium Begum
Marium Begum - 07.10.2022 17:44

Brilliant first part to the tutorial! Great work!

Ответить
Poster gmail
Poster gmail - 23.09.2022 14:28

Damn dude. Less typing and more explaining. 15 minutes in and all you did was create a tiny object passing a string to the object mapper.

Ответить
Krishna Singhal
Krishna Singhal - 12.07.2022 20:50

This is such a good video, Idk why people didnt comment ques and ans instead of all that.

Ответить
bahaa badr
bahaa badr - 26.06.2022 18:59

hi, iam getting the error: "Definieren Sie die Hauptmethode als:
public static void main(String[] args):"

am i missing launching the app from "public static void main(String[] args) from anywhere in your tutorial?

Ответить
Jason Li
Jason Li - 22.06.2022 00:05

we love good content

Ответить
Anton Potuzhniy
Anton Potuzhniy - 07.06.2022 10:45

so so well explained

Ответить
Mark Thomas
Mark Thomas - 26.03.2022 18:19

Great video, thank you. DeltaJSON is really useful if you are working with JSON, it does compare, merge and graft.

Ответить
zr
zr - 26.03.2022 15:48

doesn't work for collections

Ответить
Niraj Chowdhary
Niraj Chowdhary - 28.02.2022 18:25

I believe when you write assertEquals, "Coder from scratch" will come as the first parameter and getting value from node tree as second. I know it does not matter but just mentioning it since i noticed that. assertEquals(expected, actual) is the convention. BTW great video :D

Ответить
unfinished sentenc
unfinished sentenc - 22.12.2021 22:14

I really liked the tutorial. I just wish that you would increase font size or zoom in while typing. It is very difficult to read.

Ответить
Jesus David Gil Berdugo
Jesus David Gil Berdugo - 16.11.2021 19:23

cool i liked the testing lesson

Ответить