Skip to content

Python JSON examples. Encoding and Decoding to from JSON

License

Notifications You must be signed in to change notification settings

Issamricin/json-by-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

json-by-example

Python JSON examples. Encoding and Decoding to from JSON

python modules description:

  1. a_example.py: This module contains a sample of encoding and decoding json strings into python dictionaries, and from python dictionaries back to json strings.
  2. b_example.py: This module is similar to the previous one but it focuses more on the printing, and showing parts of the dictionary, and how to print it in a pretty way.
  3. c_example.py: This module is focusing on interncode() which divides the data into chunks that can be accessed in a loop.
  4. d_example.py: This module is about making a custom encoder and decoder for "complex" data. A data type that can't be serialized.
  5. e_example.py: This module is similar to the previous one but different data type, datetime data type.
  6. f_example.py: This module is the first exercise that you have to solve. The data contains both complex and datetime data types, you need to create a custom encoder and decoder for this data.
  7. g_example.py: This module is also an exercise with different data types (data,timedelta,timezone) that needs a different way of encoding and decoding.
  8. h_example.py: This module is the final exercise, it contains emailmessage, ipv4address, parseresult data types.

Note:

After solving exercises f-g-h files, You have to make test cases for your code. Its important to add test cases. Use pytest to make tests for your code and we will check them.

Also there will be discussion about your code. So questions (why did you do this instead of that...etc.) about your code so be prepared.

About

Python JSON examples. Encoding and Decoding to from JSON

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages