Skip to content

Commit 82bed60

Browse files
authored
Update README.md
1 parent 4f4f76a commit 82bed60

File tree

1 file changed

+14
-27
lines changed

1 file changed

+14
-27
lines changed

README.md

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,13 +1035,12 @@ To Start using the sqlite3 library:
10351035
JSON is text, written with JavaScript object notation. JSON is a syntax for storing and exchanging data.
10361036
It is commonly used for transmitting data in web applications (e.g., sending some data from the server to the client, so it can be displayed on a web page
10371037
and vice versa
1038-
1039-
10401038
- `json.loads()`
10411039
-json. load() takes a file object and returns the json object. A JSON object contains data in the form of key/value pair. The keys are strings and the values are the JSON types
10421040
- `json.dumps()`
10431041
-json.dumps() function converts a Python object into a json string
10441042
.It is the exact opposite of json.loads.
1043+
10451044
## THIS IS THE ENCODING DECODING LIST
10461045
JSON Python
10471046
@@ -1061,40 +1060,28 @@ false False
10611060
10621061
null None
10631062
1064-
## Encoding is from python to JSON(final type)
1063+
1064+
- ` Encoding is from python to JSON(final type)`
10651065
>>> json.JSONEncoder().encode({"foo": ["bar", "baz"]})
10661066
'{"foo": ["bar", "baz"]}'
10671067
1068-
## Decoding is from JSON to python(final type)
1068+
1069+
- `Decoding is from JSON to python(final type)`
10691070
10701071
## other commands
10711072
10721073
- `iterencode(o)`
10731074
-Encode the given object, o, and yield each string representation as available. For example:
1074-
1075-
for chunk in json.JSONEncoder().iterencode(bigobject):
1076-
mysocket.write(chunk)
1077-
1078-
` -sort-keys`
1079-
-Sort the output of dictionaries alphabetically by key.
1080-
1081-
`-h, --help¶`
1082-
- help box
1083-
1084-
`infile`
1085-
-to check your Json file for syntax
1086-
1087-
`outfile`
1088-
-Write the output of the infile to the given outfile
1075+
>>>for chunk in json.JSONEncoder().iterencode(bigobject):
1076+
mysocket.write(chunk)]
1077+
` -sort-keys` -Sort the output of dictionaries alphabetically by key.
1078+
`-h, --help¶`- help box
1079+
`infile`-to check your Json file for syntax
1080+
`outfile`-Write the output of the infile to the given outfile
10891081
10901082
## note
1091-
If the optional infile and outfile arguments are not specified, sys.stdin and sys.stdout will be used respectively:
1092-
1093-
1094-
`json.tool `
1095-
- to validate and pretty-print JSON objects.
1096-
1097-
`raw_decode`
1098-
- This can be used to decode a JSON document from a string that may have extraneous data at the end.
1083+
If the optional infile and outfile arguments are not specified, sys.stdin and sys.stdout will be used respectively:
1084+
`json.tool `- to validate and pretty-print JSON objects.
1085+
`raw_decode`- This can be used to decode a JSON document from a string that may have extraneous data at the end.
10991086
11001087
#### [Learn More about JSON Module](https://docs.python.org/3.7/library/json.html)

0 commit comments

Comments
 (0)