Json package
Project description
Json Uts
Installation
pip install jsonUts
Usage
Json sample
my_json = {
"person":{
"name":"json uts",
"age": 30
},
"my cars":[
{"pattern":"Ferrari","year":2015},
{"pattern":"Lamborghini","year":2018}
],
"job":"Software developer",
"UpperCase":123,
"with space":"lets go!"
}
simple transform
from jsonUts import jsonToObj
jsonO = jsonToObj(my_json)
#jsonO = jsonToObj(my_json,toLower=True) # to convert all keys in lower case.
#jsonO = jsonToObj(my_json,trim_keys=True) # remove white spaces from the start and end
print(jsonO.person.name)
print(jsonO.job)
print(jsonO.with_space)
print(jsonO.my_cars[0].pattern)
Reverse
#After creating you object (jsonO), you can use it
json_again = jsonO.toJson()
json_again_original = jsonO.toJson(original_keys=True) # if you want your original key names back
'2022-05-25'
Change Log
0.0.1 (2022-06-10)
- First Release
0.0.2 (2022-06-10)
- Required libs
0.0.3 (2022-06-11)
- TblUts
0.0.4 (2022-07-20)
- Adjustment at sqlToDate function
0.0.5 (2022-05-25)
- Readme details
0.0.9 (2022-08-18)
- DateMatch
0.1.0 (2022-10-03)
- Add Hours,Minutes and Seconds
0.1.1 (2023-01-18)
- Next Working Day
0.1.2 (2023-04-20)
- is_weeekend
0.1.6 (2023-04-26)
- fmt bug date adjust
0.2.3 (2023-07-11)
- interval
0.2.4 (2023-09-25)
- different formats outputs
0.2.5 (2023-09-25)
- fix getFormat
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jsonUts-1.0.0.tar.gz
(3.8 kB
view hashes)