JSON Tutorial Part-5 | How To Read Data from JSON File in Java | JSON Simple API

  Рет қаралды 151,290

SDET- QA

SDET- QA

4 жыл бұрын

Topics :
------------
1) How To Read Data from JSON File in Java
2) JSON Simple API
JSON Used:
--------------------
{
"firstName": "John",
"lastName": "Kennedy",
"address": [
{
"street": "abc",
"city": "Hyderabad",
"state": "TL"
},
{
"street": "xyz",
"city": "Chennai",
"state": "TN"
}
]
}
#########################
Udemy Courses:
#########################
Manual Testing+Agile with Jira Tool
************************************
► shorturl.at/xNXZ4
Selenium with Java+Cucumber
********************************
► shorturl.at/aIKMW
Selenium with Python & PyTest
********************************
► shorturl.at/ELW09
Selenium with python using Robot framework
****************************************
► shorturl.at/bcDPZ
API Testing(Postman, RestAssured & SoapUI)
*****************************************
► shorturl.at/uAWY7
Web & API Automation using Cypress with Javascript
********************************************
► rb.gy/4uum2n
Playwright with Javascript
**************************
► shorturl.at/gALZ1
Jmeter-Performance Testing
************************
► rb.gy/ocj7r2
SDET Essencials(Full Stack QA)
*************************
► rb.gy/hlnf2v
Appium-Mobile Automation Testing
************************************
► rb.gy/wmzv64
Java Collections
*****************
► bit.ly/3S66ezE
Python Programming
*********************
► urlis.net/gdsfpb0s
Cucumber BDD Framework
***************************
► bit.ly/3F7d69r
Protractor with Javascript
***************************
► urlis.net/4uddm1qb
####################################
KZfaq Playlists:
####################################
Manual Testing & Agile
***********************
► bit.ly/3ujvaYa
► bit.ly/3OYzxQj
SQL
*************************
► bit.ly/3R6XjeG
► bit.ly/3nE0a1s
► bit.ly/3IeKuuJ
linux & Shell Scripting
**********************
► bit.ly/3up1Z6a
► bit.ly/3nzvGxx
Java
**********************
► bit.ly/3R9QfOs
► bit.ly/3AoRMKM
► bit.ly/3IbTTDn
► bit.ly/3ybXInv
► bit.ly/3yCoHdw
Selenium With Java+Cucumber
********************************
► bit.ly/3P2FMm4
► bit.ly/3yhiIt4
► bit.ly/3uokzet
► bit.ly/3a7XIND
► bit.ly/3umN2S9
► bit.ly/3aar7GW
► bit.ly/3y9kD2S
► bit.ly/3uhLskn
Python
********************************
► bit.ly/3agNgU0
► bit.ly/3NJNnoy
► bit.ly/2CTQ4mR
► bit.ly/3OIYWh1
Selenium With Python,Pytest&Behave
***************************************
► bit.ly/3OHHoC9
► bit.ly/3IeNLdv
► bit.ly/2J4tPeT
► bit.ly/3ydSkAq
Selenium With Python Using Robert Framework
(Web&API Testing)
*************************************************
► bit.ly/3nUvlpr
► bit.ly/3nUvE3z
API Testing (Postman,SoapUi,&Rest Assured)
**********************************************
► bit.ly/3OXacWY
► bit.ly/3yh0UhE
► bit.ly/3nC9DWQ
► bit.ly/3yGfhNS
► bit.ly/3OJa11H
► bit.ly/3P2slCC
Mobile App Testing Appium
****************************
► bit.ly/3Al49HG
Performance Testing Jmeter
*******************************
► bit.ly/3nz4fE7
Maven,Jenkins,Git,Github,CI/CD
*******************************
► bit.ly/3P16HPj
► bit.ly/3yhlUVA
► bit.ly/3afYfwT
► bit.ly/3yGzweG
► bit.ly/3yF73Ws
► bit.ly/3NCOmH7
SQL,DB Testing&ETL,Bigdata
*******************************
► bit.ly/3NKOcNY
► bit.ly/3OVpDyI
► bit.ly/3NEvUy0
► bit.ly/3IryxlT
► bit.ly/3RkWBLh
JavaScript Based Automation Tools
********************************
► bit.ly/3nUx51X
► bit.ly/3AqI6Q0
► bit.ly/3yeurbT
► bit.ly/3ujzpTK
Selector Hub Tools
********************
►rb.gy/h3h424
GraphQL
******************
► rb.gy/sj3gys
Cypress API Testing
********************
► shorturl.at/fjKPX
Cypress Web Testing
**********************
► shorturl.at/agjlK
Playwright with Javascipt
**************************
► shorturl.at/adSTY
#JSONParsingJava
#JavaJSONReading
#JSONFileHandling
#JavaFileIO
#JSONDataExtraction
#JSONDataManipulation
#JavaDataParsing
#JSONParsingTutorial
#JavaJSONExamples
#JSONReadCode
#JavaProgramming
#JSONDataProcessing
#JavaTipsAndTricks
#JSONDataAccess
#JavaFileHandlingTips
#JSONDataExploration
#JavaProgrammingTutorial
#JSONReadingMethods
#JavaJSONParsingDemo
#JSONFileOperations
#JavaIOExplained
#JSONParsingTechniques
#JavaFileReadTutorial
#JSONDataFetching
#JavaJSONReadingGuide
#JSONParsingBestPractices
#JavaFileManipulation
#JSONDataVisualization
#JavaCodingSkills
#JSONParsingWalkthrough
#JavaFileIOTricks
#JSONDataAnalysis
#JavaJSONHandsOn
#JSONParsingStepByStep
#JavaFileReadExamples
#JSONDataTransformation

Пікірлер: 116
@FourAlexia
@FourAlexia 2 жыл бұрын
Thank you! Excellent tutorial, getting back in the groove of Java syntax.
@kiranrao7429
@kiranrao7429 4 жыл бұрын
Hello sir, I never comment here, but you made me to do today That was very clear explanation
@arianetrek7049
@arianetrek7049 8 ай бұрын
Thak you for the complete tutorial about JSON, and kudos for the easy to understand examples shown !
@sdetpavan
@sdetpavan 8 ай бұрын
Welcome
@himanshubagga6924
@himanshubagga6924 3 жыл бұрын
Thank you for the wonderful video.
@Arnatore
@Arnatore 4 жыл бұрын
Thank you a lot sir, this is exactly what I was looking for.
@sdetpavan
@sdetpavan Жыл бұрын
You are welcome!
@hemantsahu4100
@hemantsahu4100 Жыл бұрын
sir thankyou so much sir what a super content for JSON java there is no such content on youtube like your thankyou thankyou so much sir
@sdetpavan
@sdetpavan Жыл бұрын
Welcome
@dipeshrverma
@dipeshrverma 3 жыл бұрын
Awesome... I have learned complete automation by just your video... You are awesome
@sdetpavan
@sdetpavan Жыл бұрын
Glad to hear that
@jb8512
@jb8512 2 жыл бұрын
dude, you're the best. thank you so much
@Sansysofancy
@Sansysofancy 3 жыл бұрын
LIFE SAVER! Thank you sir!
@sdetpavan
@sdetpavan Жыл бұрын
Welcome
@jnp9155
@jnp9155 2 жыл бұрын
Thank you sir for this type of video. which helps us to learn in practical way.
@sdetpavan
@sdetpavan Жыл бұрын
welcome
@ArunS-lb8sc
@ArunS-lb8sc 3 ай бұрын
Good explanation :)
@sdetpavan
@sdetpavan 3 ай бұрын
Thanks
@mrhedrapt
@mrhedrapt 2 жыл бұрын
Such a good video! Thank you so much! Saved my User Story
@sdetpavan
@sdetpavan 2 жыл бұрын
most welcome
@vivekfirebase4074
@vivekfirebase4074 2 жыл бұрын
Explained clearly. thank you for the video❤
@sdetpavan
@sdetpavan Жыл бұрын
welcome
@shivakumaryennam7530
@shivakumaryennam7530 3 жыл бұрын
Excellent explanation sir.. I'm looking for this content 🙏
@sdetpavan
@sdetpavan Жыл бұрын
Thanks
@ankitshrivastava1772
@ankitshrivastava1772 3 жыл бұрын
Thanks, Sir for this video. Here we are values from the JSON one by one that we can do from the property file as well, is there any way so that we can parse the whole JSON file directly instead of reading single-2 values from the JSON, please make a video for the same.
@Chunmun897
@Chunmun897 3 жыл бұрын
I was looking for it. Thanks for great video.
@sdetpavan
@sdetpavan 3 жыл бұрын
Glad you liked it
@sreekanthkanneganti7051
@sreekanthkanneganti7051 3 жыл бұрын
Clear explanation about reading JSON object and JSON Array
@sdetpavan
@sdetpavan Жыл бұрын
Thanks
@hanshikaavasudevan3873
@hanshikaavasudevan3873 2 жыл бұрын
Thanks a lot Sir for amazingly Explaining each line .....
@sdetpavan
@sdetpavan 2 жыл бұрын
Most welcome
@sankeethganeswaran3024
@sankeethganeswaran3024 4 жыл бұрын
Thank you very much you are doing a great service.
@sankeethganeswaran3024
@sankeethganeswaran3024 4 жыл бұрын
How would I write to a JSON file using java?
@kumarmangalam6267
@kumarmangalam6267 2 жыл бұрын
Can you please explain what if at line 24, there is again JSON object. (inner JSON). I created a another object for inner JSON from outer one but that doesn't seem to work.
@saimaahmad3658
@saimaahmad3658 3 жыл бұрын
Excellent job! Thank you
@sdetpavan
@sdetpavan 3 жыл бұрын
Glad you liked it!
@kapilkaushal6178
@kapilkaushal6178 2 жыл бұрын
Great explanation.... Can you please advise if I need to filter the data in json then how can I do that. For ex. In my json I have key as severity and value as critical. Hence I need to filter out only the elements that contains this key value pair.
@nagarajannagarajan2698
@nagarajannagarajan2698 Жыл бұрын
tnq for the example coding and explanation it very use full to me. tns a lot sir.
@sdetpavan
@sdetpavan Жыл бұрын
Welcome
@TeachingCodes
@TeachingCodes 2 жыл бұрын
Sir itne badhiya video hao bs audio thode increase kardete toh maja aa jata......may gbu you are very great. Thanks for the amaing conent.
@surendranathkanchela887
@surendranathkanchela887 3 жыл бұрын
You solved my problem brother. Thank you :)
@sdetpavan
@sdetpavan Жыл бұрын
Welcome
@susmithanc5320
@susmithanc5320 Жыл бұрын
Thanks sir for posting
@sdetpavan
@sdetpavan Жыл бұрын
Welcome
@lucaslimf
@lucaslimf 8 ай бұрын
is very nice! thanks for this video Sir
@sdetpavan
@sdetpavan 8 ай бұрын
Welcome
@ArturoBatistute
@ArturoBatistute 3 жыл бұрын
Thanks a lot ! You save my day!
@sdetpavan
@sdetpavan Жыл бұрын
You're welcome!
@yuvrajbaser
@yuvrajbaser Жыл бұрын
Thank you for this amazing explanation.
@sdetpavan
@sdetpavan Жыл бұрын
You're very welcome!
@sathishvijay3476
@sathishvijay3476 Жыл бұрын
Clear cut explanation always❤
@sdetpavan
@sdetpavan Жыл бұрын
Thanks
@shaiksuleman3191
@shaiksuleman3191 4 жыл бұрын
Crystal Clear Explanation SIr
@sdetpavan
@sdetpavan 4 жыл бұрын
Thank you for your feedback.
@pradeepmatkatte3454
@pradeepmatkatte3454 2 жыл бұрын
well explained in simple way.
@sdetpavan
@sdetpavan Жыл бұрын
thanks
@hrithikmohan5948
@hrithikmohan5948 2 жыл бұрын
Very useful.. Thanks a lot ! 👍🏻
@anwarsosko5963
@anwarsosko5963 3 жыл бұрын
very helpful, thanks
@sdetpavan
@sdetpavan Жыл бұрын
You're welcome!
@tasin487
@tasin487 4 жыл бұрын
Thanks a lot sir
@sdetpavan
@sdetpavan Жыл бұрын
Most welcome
@manasipalkar9794
@manasipalkar9794 4 жыл бұрын
Hi Sir , I am getting this error An internal error occurred during: "Search Marketplace for compatible editors (*.json)". I cannot resolve it. My json symbol is of Visual code and not Eclipse as shown in yours.
@JaswantSingh-di8nu
@JaswantSingh-di8nu 2 жыл бұрын
Very good tutorial.
@sdetpavan
@sdetpavan Жыл бұрын
Glad you liked it!
@xyzyz25
@xyzyz25 3 жыл бұрын
Sir, when we just have multiple records in a array without key value assigned to it like "address " then what should we write in place of array.get(what should we write here ) ? Please reply
@agon-eery
@agon-eery Жыл бұрын
Bot sure if this is still relevant, but do you mean something like, say: ‘ “test”:[obj_1,obj_2] ‘
@karamalkalash6620
@karamalkalash6620 2 жыл бұрын
thank you very much
@sdetpavan
@sdetpavan 2 жыл бұрын
welcome
@042joe
@042joe 2 жыл бұрын
Hello Sir, While trying to excute the code, I am getting org json.simple.JSONObject cannot be cast to org.json.simple.JSONArray. Kindly help me to resolve this.
@jeremycharpentier3573
@jeremycharpentier3573 2 жыл бұрын
Thanks for this tutorial
@sdetpavan
@sdetpavan Жыл бұрын
Always welcome
@brajray2881
@brajray2881 4 жыл бұрын
Thanks you so much 😗💓
@sdetpavan
@sdetpavan Жыл бұрын
You're welcome
@Cool94_4u
@Cool94_4u 3 жыл бұрын
im getting exception for converting Object into JSONObject -> Exception in thread "main" java.lang.ClassCastException: org.json.simple.JSONArray cannot be cast to org.json.simple.JSONObject ==== also checked ISONObject accepts map , so hows ur code working? if we are having Object with us? plz help me
@sameenap1419
@sameenap1419 2 жыл бұрын
Hello sir, I did exactly the same for my java servlet web application to read a json file, but while giving the json file path like this, it shown as file not found exception, Iam using using tomcat server, How to resolve this? kindly help
@pnpcreator
@pnpcreator 2 жыл бұрын
Thanks 🙏
@sdetpavan
@sdetpavan Жыл бұрын
You’re welcome 😊
@joseramirez-ep8pj
@joseramirez-ep8pj 2 жыл бұрын
Thank you so much
@sdetpavan
@sdetpavan 2 жыл бұрын
You're most welcome
@lateefjeremiah9099
@lateefjeremiah9099 8 ай бұрын
Is there a way we can filter the data we want to get? Can we use the dot and bracket notation as it is found in an array?
@swapnabhaskaruni9652
@swapnabhaskaruni9652 Жыл бұрын
Do you have a video tutorial on integrating testrail with jenkins, by that i mean invoking a jenkins job to run automation test scripts and post back the results to testrail.
@sadathossainchowdhury631
@sadathossainchowdhury631 4 жыл бұрын
Can you put the data(from JSON file) in ArrayList or any other data structure ?
@sebastus27
@sebastus27 3 жыл бұрын
Wouldn't it be ok to apply serialization as well?
@ahmadsoffi206
@ahmadsoffi206 Жыл бұрын
Thank you, but what if we want to have array of employees, or having multiple employees?
@lrpbro6945
@lrpbro6945 8 ай бұрын
Hi sir, is there any chances of editing the existing data on json file???
@sureshisoft4555
@sureshisoft4555 4 жыл бұрын
hi pavan ..how to Typecast jsonobject ito onto integer...my json file has integer valuew getting error like "Cannot Cast object to int" -int empid=(int) empjsonobject.get("id");
@hyperion4899
@hyperion4899 4 жыл бұрын
use long instead of int
@GurudattaPraharaj
@GurudattaPraharaj 3 жыл бұрын
thaks, how to update the values from json file and create a post request.
@nrravitej2498
@nrravitej2498 4 жыл бұрын
When i create employee.jsom, its coming with icon as {}, but for you it came as circle, why so?
@sdetpavan
@sdetpavan 4 жыл бұрын
Install "JSON Editor plugin" from Eclipse Market place. You will get circle icon.
@SkAli-ol4hn
@SkAli-ol4hn Жыл бұрын
Thank you Sir, my question is- how I get a specific value from JSONArray Inside of JSONArray there is a lots of element with same keys but different value example of I need Value Of "Y" from 4th number elements and we Don't know the elements number then ? "address": [ {"x":xyz, "Y":abc}, {"x":xyz, "Y":abc }, {"x":xyz, "Y":nsmsm }, {"x":xyz, "Y":sjksk }]
@itsmathsforu2980
@itsmathsforu2980 3 жыл бұрын
Tell me how to change value of json object using java its urgent
@StyleEuphoria
@StyleEuphoria 2 жыл бұрын
Hello sir can you show how to read data of json file from resources folder in spring boot?
@srikanthreddymadi1495
@srikanthreddymadi1495 2 жыл бұрын
Will you Please share how to write the same json file using loop
@mahasenmohamed1036
@mahasenmohamed1036 2 жыл бұрын
Thanks, sir. But I am getting an Exception error for" (JSONObject)obj " saying that : "class org.json.simple.JSONObject cannot be cast to class org.json.JSONObject (org.json.simple.JSONObject and org.json.JSONObject are in unnamed module of loader 'app')". Please help, what should I do?
@VrlHtzz
@VrlHtzz 2 жыл бұрын
I'm getting Same error have you got the solution?
@andyrojhn9235
@andyrojhn9235 Жыл бұрын
@@VrlHtzz me too, did you get the solution
@VrlHtzz
@VrlHtzz Жыл бұрын
@@andyrojhn9235 I actually don't remember now 😅 you can find your solution using chatGPT
@hiiamjohnwatchweontv5552
@hiiamjohnwatchweontv5552 Жыл бұрын
@@VrlHtzz jokes on me xd
@VrlHtzz
@VrlHtzz Жыл бұрын
@@hiiamjohnwatchweontv5552 what 🙄
@rahadulhaq6387
@rahadulhaq6387 4 жыл бұрын
I dont have Malven in eclipse How can i do now??
@mallikatripathi8031
@mallikatripathi8031 3 жыл бұрын
I have one question please help me out [ { "claim_id": "44", "claim_line": "1", "account_id": "444041" } ] I have this body that I have to use in POST request please tell me how to do that please help me out.
@pritisongade846
@pritisongade846 2 жыл бұрын
While running the code I am getting exception in thread " main " unexpected character ( c) at position 189
@aryanreddy989
@aryanreddy989 2 жыл бұрын
Same error Any Fix?
@nrravitej2498
@nrravitej2498 4 жыл бұрын
please post the josn you use in your example in description
@sdetpavan
@sdetpavan 4 жыл бұрын
You can check it now. I copied JSON in description.
@prioratodikingsbridge1717
@prioratodikingsbridge1717 7 ай бұрын
I dont know if thats the old version ,but now you CANT not select an archetype
@prudviraj97
@prudviraj97 2 жыл бұрын
Can I write the json data in class?
@tonygan9332
@tonygan9332 14 күн бұрын
Hi Do you have an the Json code
@haripriyaraja1890
@haripriyaraja1890 Жыл бұрын
Can u tell me how to read json in c
@athulunni5822
@athulunni5822 4 жыл бұрын
Can you please explain what parser means and why it is used
@subhanshutripathi1352
@subhanshutripathi1352 3 жыл бұрын
it is used to read the JSON file
@athulunni5822
@athulunni5822 3 жыл бұрын
@@subhanshutripathi1352 thanks
@vishalmishra1937
@vishalmishra1937 2 жыл бұрын
its showing error not foundjsonparser
@DACODFISH
@DACODFISH 2 жыл бұрын
same here !
@avishekbehera
@avishekbehera 4 жыл бұрын
json simple is too old , it is better to user Gson or Jackson
How to read JSON file in Java? ( Jackson Databind )
12:44
Tech Recipes - Dipesh Hadye
Рет қаралды 18 М.
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 3,7 МЛН
Jumping off balcony pulls her tooth! 🫣🦷
01:00
Justin Flom
Рет қаралды 28 МЛН
Gym belt !! 😂😂  @kauermotta
00:10
Tibo InShape
Рет қаралды 18 МЛН
What is JSON ?
11:56
Telusko
Рет қаралды 1,1 МЛН
Parse JSON using Java
22:27
Coding Simplified
Рет қаралды 6 М.
How To Explain Test Automation Framework In Interviews For Selenium
13:42
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,1 МЛН
Learn JSON Step-by-Step from Scratch
13:11
Automation Step by Step
Рет қаралды 101 М.
Java File Input/Output - It's Way Easier Than You Think
8:18
Coding with John
Рет қаралды 445 М.