how easy is yaml to work with in python compared to json

0 votes
I am trying to use some configuration files in my project and have searched several web sites but didn't find the clear answer,

For reference I found below info on another website but if you have some clear views other than this, as python developer what do you choose and why ? Please post,

Yaml and Json are the simplest and most commonly used file formats to store settings/config. PyYaml can be used to parse yaml. Json is already part of python from 2.5. Yaml is a superset of Json. Json will solve most uses cases except multi line strings where escaping is required. Yaml takes care of these cases too.
Dec 15, 2020 in Python by anonymous
• 120 points
877 views

1 answer to this question.

0 votes

Hi,

First thing YAML and JSON are not used as a language. You can think in this way that these are the file format. In some cases, you may need YAML and in some cases, you may need JSON. It totally depends on your use case.

answered Dec 16, 2020 by MD
• 95,460 points

Related Questions In Python

0 votes
1 answer

How to create a unicode string in python with the string eg: This is a string?

Hey, @Roshni, It is very simple to execute, ...READ MORE

answered Jun 23, 2020 in Python by Gitika
• 65,770 points
830 views
+4 votes
7 answers
+1 vote
1 answer

How to check if a string is null in python

Try this: if cookie and not cookie.isspace(): # the ...READ MORE

answered Aug 20, 2018 in Python by Priyaj
• 58,020 points
23,139 views
0 votes
1 answer

How to replace values with None in Pandas data frame in Python?

Actually in later versions of pandas this ...READ MORE

answered Aug 30, 2018 in Python by Priyaj
• 58,020 points
11,759 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,463 views
0 votes
1 answer
0 votes
1 answer

How to connect mail server with smtplib module in python?

Hi@akhtar, You can connect mail server using smtplib ...READ MORE

answered Apr 15, 2020 in Python by MD
• 95,460 points
1,449 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP