json-duplicate-keys 2023.11.26__tar.gz → 2024.2.21__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,373 @@
1
+ Metadata-Version: 2.1
2
+ Name: json-duplicate-keys
3
+ Version: 2024.2.21
4
+ Summary: Flatten/ Unflatten and Load(s)/ Dump(s) JSON File/ Object with Duplicate Keys
5
+ Home-page: https://github.com/truocphan/json-duplicate-keys
6
+ Author: TP Cyber Security
7
+ Author-email: tpcybersec2023@gmail.com
8
+ License: MIT
9
+ Description: # JSON Duplicate Keys
10
+ Flatten/ Unflatten and Load(s)/ Dump(s) JSON File/ Object with Duplicate Keys
11
+
12
+ <p align="center">
13
+ <a href="https://github.com/truocphan/json_duplicate_keys/releases/"><img src="https://img.shields.io/github/release/truocphan/json_duplicate_keys" height=30></a>
14
+ <a href="#"><img src="https://img.shields.io/github/downloads/truocphan/json_duplicate_keys/total" height=30></a>
15
+ <a href="#"><img src="https://img.shields.io/github/stars/truocphan/json_duplicate_keys" height=30></a>
16
+ <a href="#"><img src="https://img.shields.io/github/forks/truocphan/json_duplicate_keys" height=30></a>
17
+ <a href="https://github.com/truocphan/json_duplicate_keys/issues?q=is%3Aopen+is%3Aissue"><img src="https://img.shields.io/github/issues/truocphan/json_duplicate_keys" height=30></a>
18
+ <a href="https://github.com/truocphan/json_duplicate_keys/issues?q=is%3Aissue+is%3Aclosed"><img src="https://img.shields.io/github/issues-closed/truocphan/json_duplicate_keys" height=30></a>
19
+ <a href="https://pypi.org/project/json-duplicate-keys/" target="_blank"><img src="https://img.shields.io/badge/pypi-3775A9?style=for-the-badge&logo=pypi&logoColor=white" height=30></a>
20
+ <a href="https://www.facebook.com/61550595106970" target="_blank"><img src="https://img.shields.io/badge/Facebook-1877F2?style=for-the-badge&logo=facebook&logoColor=white" height=30></a>
21
+ <a href="https://twitter.com/TPCyberSec" target="_blank"><img src="https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge&logo=twitter&logoColor=white" height=30></a>
22
+ <a href="https://github.com/truocphan" target="_blank"><img src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white" height=30></a>
23
+ <a href="mailto:tpcybersec2023@gmail.com" target="_blank"><img src="https://img.shields.io/badge/Gmail-D14836?style=for-the-badge&logo=gmail&logoColor=white" height=30></a>
24
+ <a href="https://www.buymeacoffee.com/truocphan" target="_blank"><img src="https://img.shields.io/badge/Buy_Me_A_Coffee-FFDD00?style=for-the-badge&logo=buy-me-a-coffee&logoColor=black" height=30></a>
25
+ </p>
26
+
27
+ ## Installation
28
+ #### From PyPI:
29
+ ```console
30
+ pip install json-duplicate-keys
31
+ ```
32
+ #### From Source:
33
+ ```console
34
+ git clone https://github.com/truocphan/json-duplicate-keys.git --branch <Branch/Tag>
35
+ cd json-duplicate-keys
36
+ python setup.py build
37
+ python setup.py install
38
+ ```
39
+
40
+ ## Basic Usage
41
+ ### normalize_key(`name`, `dupSign_start`="{{{", `dupSign_end`="}}}", `_isDebug_`=False)
42
+ _Normalize Key name_
43
+ - `name`: key name
44
+ - `dupSign_start`:
45
+ - `dupSign_end`:
46
+ - `_isDebug_`: Show/ Hide debug error messages
47
+ ```python
48
+ import json_duplicate_keys as jdks
49
+
50
+ print(jdks.normalize_key("version{{{_2_}}}"))
51
+ # OUTPUT: version
52
+ ```
53
+ ---
54
+
55
+ ### loads(`Jstr`, `dupSign_start`="{{{", `dupSign_end`="}}}", `ordered_dict`=False, `_isDebug_`=False)
56
+ _Deserialize a JSON format string to a class `JSON_DUPLICATE_KEYS`_
57
+ - `Jstr`: a JSON format string
58
+ - `dupSign_start`:
59
+ - `dupSign_end`:
60
+ - `ordered_dict`: preserves the order in which the Keys are inserted
61
+ - `_isDebug_`: Show/ Hide debug error messages
62
+ ```python
63
+ import json_duplicate_keys as jdks
64
+
65
+ Jstr = '{"author": "truocphan", "version": "22.3.3", "version": "latest", "release": [{"version": "latest"}], "snapshot": {"author": "truocphan", "version": "22.3.3", "release": [{"version": "latest"}]}}'
66
+
67
+ JDKSObject = jdks.loads(Jstr)
68
+
69
+ print(JDKSObject)
70
+ # OUTPUT: <json_duplicate_keys.JSON_DUPLICATE_KEYS object at 0x00000270AE987940>
71
+ ```
72
+ ---
73
+
74
+ ### load(`Jfilepath`, `dupSign_start`="{{{", `dupSign_end`="}}}", `ordered_dict`=False, `_isDebug_`=False)
75
+ _Deserialize a JSON format string from a file to a class `JSON_DUPLICATE_KEYS`_
76
+ - `Jfilepath`: The path to the file containing the JSON format string
77
+ - `dupSign_start`:
78
+ - `dupSign_end`:
79
+ - `ordered_dict`: preserves the order in which the Keys are inserted
80
+ - `_isDebug_`: Show/ Hide debug error messages
81
+ ```python
82
+ # /path/to/file.json: {"author": "truocphan", "version": "22.3.3", "version": "latest", "release": [{"version": "latest"}], "snapshot": {"author": "truocphan", "version": "22.3.3", "release": [{"version": "latest"}]}}
83
+
84
+ import json_duplicate_keys as jdks
85
+
86
+ Jfilepath = "/path/to/file.json"
87
+
88
+ JDKSObject = jdks.load(Jfilepath)
89
+
90
+ print(JDKSObject)
91
+ # OUTPUT: <json_duplicate_keys.JSON_DUPLICATE_KEYS object at 0x00000270AE986D40>
92
+ ```
93
+ ---
94
+
95
+ ### JSON_DUPLICATE_KEYS.getObject()
96
+ _Get the JSON object_
97
+ ```python
98
+ import json_duplicate_keys as jdks
99
+
100
+ Jstr = '{"author": "truocphan", "version": "22.3.3", "version": "latest", "release": [{"version": "latest"}], "snapshot": {"author": "truocphan", "version": "22.3.3", "release": [{"version": "latest"}]}}'
101
+
102
+ JDKSObject = jdks.loads(Jstr)
103
+
104
+ print(JDKSObject.getObject())
105
+ # OUTPUT: {'author': 'truocphan', 'version': '22.3.3', 'version{{{_2_}}}': 'latest', 'release': [{'version': 'latest'}], 'snapshot': {'author': 'truocphan', 'version': '22.3.3', 'release': [{'version': 'latest'}]}}
106
+ ```
107
+ ---
108
+
109
+ ### JSON_DUPLICATE_KEYS.get(`name`, `separator`="||", `parse_index`="$", `_isDebug_`=False)
110
+ _Get value in the JSON object by `name`_
111
+ - `name`: the key name of the JSON object. Supported flatten key name format
112
+ - `separator`:
113
+ - `parse_index`:
114
+ - `_isDebug_`: Show/ Hide debug error messages
115
+ ```python
116
+ import json_duplicate_keys as jdks
117
+
118
+ Jstr = '{"author": "truocphan", "version": "22.3.3", "version": "latest", "release": [{"version": "latest"}], "snapshot": {"author": "truocphan", "version": "22.3.3", "release": [{"version": "latest"}]}}'
119
+
120
+ JDKSObject = jdks.loads(Jstr)
121
+
122
+ print(JDKSObject.get("version{{{_2_}}}"))
123
+ # OUTPUT: latest
124
+
125
+ print(JDKSObject.get("release||$0$"))
126
+ # OUTPUT: {'version': 'latest'}
127
+
128
+ print(JDKSObject.get("snapshot||author"))
129
+ # OUTPUT: truocphan
130
+ ```
131
+ ---
132
+
133
+ ### JSON_DUPLICATE_KEYS.set(`name`, `value`, `separator`="||", `parse_index`="$", `dupSign_start`="{{{", `dupSign_end`="}}}", `ordered_dict`=False, `_isDebug_`=False)
134
+ _Set a new `name` and `value` for the JSON object_
135
+ - `name`: new key name for the JSON object. Supported flat key name format
136
+ - `value`: value for key `name`
137
+ - `separator`:
138
+ - `parse_index`:
139
+ - `dupSign_start`:
140
+ - `dupSign_end`:
141
+ - `ordered_dict`: preserves the order in which the Keys are inserted
142
+ - `_isDebug_`: Show/Hide debug error messages
143
+ ```python
144
+ import json_duplicate_keys as jdks
145
+
146
+ Jstr = '{}'
147
+ JDKSObject = jdks.loads(Jstr)
148
+
149
+ print(JDKSObject.getObject())
150
+ # OUTPUT: {}
151
+
152
+ JDKSObject.set("author", "truocphan")
153
+ print(JDKSObject.getObject())
154
+ # OUTPUT: {'author': 'truocphan'}
155
+
156
+ JDKSObject.set("version", "22.3.3")
157
+ print(JDKSObject.getObject())
158
+ # OUTPUT: {'author': 'truocphan', 'version': '22.3.3'}
159
+
160
+ JDKSObject.set("version", "latest")
161
+ print(JDKSObject.getObject())
162
+ # OUTPUT: {'author': 'truocphan', 'version': '22.3.3', 'version{{{_2_}}}': 'latest'}
163
+
164
+ JDKSObject.set("release", [{"version": "latest"}])
165
+ print(JDKSObject.getObject())
166
+ # OUTPUT: {'author': 'truocphan', 'version': '22.3.3', 'version{{{_2_}}}': 'latest', 'release': [{'version': 'latest'}]}
167
+
168
+ JDKSObject.set("snapshot", {})
169
+ print(JDKSObject.getObject())
170
+ # OUTPUT: {'author': 'truocphan', 'version': '22.3.3', 'version{{{_2_}}}': 'latest', 'release': [{'version': 'latest'}], 'snapshot': {}}
171
+
172
+ JDKSObject.set("snapshot||author", "truocphan")
173
+ print(JDKSObject.getObject())
174
+ # OUTPUT: {'author': 'truocphan', 'version': '22.3.3', 'version{{{_2_}}}': 'latest', 'release': [{'version': 'latest'}], 'snapshot': {'author': 'truocphan'}}
175
+
176
+
177
+ Jstr = '[]'
178
+ JDKSObject = jdks.loads(Jstr)
179
+
180
+ print(JDKSObject.getObject())
181
+ # OUTPUT: []
182
+
183
+ JDKSObject.set("author", "truocphan")
184
+ print(JDKSObject.getObject())
185
+ # OUTPUT: [{'author': 'truocphan'}]
186
+
187
+ JDKSObject.set("release", [])
188
+ print(JDKSObject.getObject())
189
+ # OUTPUT: [{'author': 'truocphan'}, {'release': []}]
190
+
191
+ JDKSObject.set("$1$||release||", {"version": "latest"})
192
+ print(JDKSObject.getObject())
193
+ # OUTPUT: [{'author': 'truocphan'}, {'release': [{'version': 'latest'}]}]
194
+ ```
195
+ ---
196
+
197
+ ### JSON_DUPLICATE_KEYS.update(`name`, `value`, `separator`="||", `parse_index`="$", `_isDebug_`=False)
198
+ _Update new `value` for existing `name` in the JSON object_
199
+ - `name`: the key name of the JSON object. Supported flatten key name format
200
+ - `value`: new value for key `name`
201
+ - `separator`:
202
+ - `parse_index`:
203
+ - `_isDebug_`: Show/ Hide debug error messages
204
+ ```python
205
+ import json_duplicate_keys as jdks
206
+
207
+ Jstr = '{"author": "truocphan", "version": "22.3.3", "version": "latest", "release": [{"version": "latest"}], "snapshot": {"author": "truocphan", "version": "22.3.3", "release": [{"version": "latest"}]}}'
208
+
209
+ JDKSObject = jdks.loads(Jstr)
210
+
211
+ print(JDKSObject.getObject())
212
+ # OUTPUT: {'author': 'truocphan', 'version': '22.3.3', 'version{{{_2_}}}': 'latest', 'release': [{'version': 'latest'}], 'snapshot': {'author': 'truocphan', 'version': '22.3.3', 'release': [{'version': 'latest'}]}}
213
+
214
+ JDKSObject.update("version{{{_2_}}}", ["22.3.3", "latest"])
215
+ JDKSObject.update("snapshot||version", "latest")
216
+
217
+ print(JDKSObject.getObject())
218
+ # OUTPUT: {'author': 'truocphan', 'version': '22.3.3', 'version{{{_2_}}}': ['22.3.3', 'latest'], 'release': [{'version': 'latest'}], 'snapshot': {'author': 'truocphan', 'version': 'latest', 'release': [{'version': 'latest'}]}}
219
+ ```
220
+ ---
221
+
222
+ ### JSON_DUPLICATE_KEYS.delete(`name`, `separator`="||", `parse_index`="$", `_isDebug_`=False)
223
+ _Delete a key-value pair in a JSON object by key `name`_
224
+ - `name`: the key name of the JSON object. Supported flatten key name format
225
+ - `separator`:
226
+ - `parse_index`:
227
+ - `_isDebug_`: Show/ Hide debug error messages
228
+ ```python
229
+ import json_duplicate_keys as jdks
230
+
231
+ Jstr = '{"author": "truocphan", "version": "22.3.3", "version": "latest", "release": [{"version": "latest"}], "snapshot": {"author": "truocphan", "version": "22.3.3", "release": [{"version": "latest"}]}}'
232
+
233
+ JDKSObject = jdks.loads(Jstr)
234
+
235
+ print(JDKSObject.getObject())
236
+ # OUTPUT: {'author': 'truocphan', 'version': '22.3.3', 'version{{{_2_}}}': 'latest', 'release': [{'version': 'latest'}], 'snapshot': {'author': 'truocphan', 'version': '22.3.3', 'release': [{'version': 'latest'}]}}
237
+
238
+ JDKSObject.delete("version")
239
+ JDKSObject.delete("release||$0$")
240
+ JDKSObject.delete("snapshot")
241
+
242
+ print(JDKSObject.getObject())
243
+ # OUTPUT: {'author': 'truocphan', 'version{{{_2_}}}': 'latest', 'release': []}
244
+ ```
245
+ ---
246
+
247
+ ### JSON_DUPLICATE_KEYS.filter_keys(`name`, `separator`="||", `parse_index`="$", `ordered_dict`=False)
248
+
249
+ - `name`:
250
+ - `separator`:
251
+ - `parse_index`:
252
+ - `ordered_dict`:
253
+ ```python
254
+ import json_duplicate_keys as jdks
255
+
256
+ Jstr = '{"author": "truocphan", "version": "22.3.3", "version": "latest", "release": [{"version": "latest"}], "snapshot": {"author": "truocphan", "version": "22.3.3", "release": [{"version": "latest"}]}}'
257
+
258
+ JDKSObject = jdks.loads(Jstr)
259
+
260
+ print(JDKSObject.filter_keys("version").dumps())
261
+ # OUTPUT: {"version": "22.3.3", "version": "latest", "release||$0$||version": "latest", "snapshot||version": "22.3.3", "snapshot||release||$0$||version": "latest"}
262
+
263
+ print(JDKSObject.dumps())
264
+ # OUTPUT: {"author": "truocphan", "version": "22.3.3", "version": "latest", "release": [{"version": "latest"}], "snapshot": {"author": "truocphan", "version": "22.3.3", "release": [{"version": "latest"}]}}
265
+ ```
266
+ ---
267
+
268
+ ### JSON_DUPLICATE_KEYS.dumps(`dupSign_start`="{{{", `dupSign_end`="}}}", `_isDebug_`=False, `skipkeys`=False, `ensure_ascii`=True, `check_circular`=True, `allow_nan`=True, `cls`=None, `indent`=None, `separators`=None, `default`=None, `sort_keys`=False)
269
+ _Serialize a JSON object to a JSON format string_
270
+ - `dupSign_start`:
271
+ - `dupSign_end`:
272
+ - `_isDebug_`: Show/ Hide debug error messages
273
+ - For remaining arguments, please refer to [json.dump()](https://docs.python.org/3/library/json.html#json.dump)
274
+ ```python
275
+ import json_duplicate_keys as jdks
276
+
277
+ Jstr = '{"author": "truocphan", "version": "22.3.3", "version": "latest", "release": [{"version": "latest"}], "snapshot": {"author": "truocphan", "version": "22.3.3", "release": [{"version": "latest"}]}}'
278
+
279
+ JDKSObject = jdks.loads(Jstr)
280
+
281
+ print(JDKSObject.getObject())
282
+ # OUTPUT: {'author': 'truocphan', 'version': '22.3.3', 'version{{{_2_}}}': 'latest', 'release': [{'version': 'latest'}], 'snapshot': {'author': 'truocphan', 'version': '22.3.3', 'release': [{'version': 'latest'}]}}
283
+
284
+ JDKSObject.delete("version")
285
+ JDKSObject.delete("release||$0$")
286
+ JDKSObject.delete("snapshot")
287
+
288
+ print(JDKSObject.dumps())
289
+ # OUTPUT: {"author": "truocphan", "version": "latest", "release": []}
290
+ ```
291
+ ---
292
+
293
+ ### JSON_DUPLICATE_KEYS.dump(`Jfilepath`, `dupSign_start`="{{{", `dupSign_end`="}}}", `_isDebug_`=False, `skipkeys`=False, `ensure_ascii`=True, `check_circular`=True, `allow_nan`=True, `cls`=None, `indent`=None, `separators`=None, `default`=None, `sort_keys`=False)
294
+ _Serialize a JSON object to a JSON format string and write to a file_
295
+ - `Jfilepath`: the path to the file to save the JSON format string
296
+ - `dupSign_start`:
297
+ - `dupSign_end`:
298
+ - `_isDebug_`: Show/ Hide debug error messages
299
+ - For remaining arguments, please refer to [json.dump()](https://docs.python.org/3/library/json.html#json.dump)
300
+ ```python
301
+ import json_duplicate_keys as jdks
302
+
303
+ Jstr = '{"author": "truocphan", "version": "22.3.3", "version": "latest", "release": [{"version": "latest"}], "snapshot": {"author": "truocphan", "version": "22.3.3", "release": [{"version": "latest"}]}}'
304
+
305
+ JDKSObject = jdks.loads(Jstr)
306
+
307
+ print(JDKSObject.getObject())
308
+ # OUTPUT: {'author': 'truocphan', 'version': '22.3.3', 'version{{{_2_}}}': 'latest', 'release': [{'version': 'latest'}], 'snapshot': {'author': 'truocphan', 'version': '22.3.3', 'release': [{'version': 'latest'}]}}
309
+
310
+ JDKSObject.delete("version")
311
+ JDKSObject.delete("release||$0$")
312
+ JDKSObject.delete("snapshot")
313
+
314
+ Jfilepath = "/path/to/file.json"
315
+ JDKSObject.dump(Jfilepath)
316
+
317
+ JDKSObject_load = jdks.load(Jfilepath)
318
+ print(JDKSObject_load.getObject())
319
+ # OUTPUT: {'author': 'truocphan', 'version': 'latest', 'release': []}
320
+ ```
321
+ ---
322
+
323
+ ### JSON_DUPLICATE_KEYS.flatten(`separator`="||", `parse_index`="$", `ordered_dict`=False, `_isDebug_`=False)
324
+ _Flatten a JSON object to a single key-value pairs_
325
+ - `separator`:
326
+ - `parse_index`:
327
+ - `ordered_dict`: preserves the order in which the Keys are inserted
328
+ - `_isDebug_`: Show/ Hide debug error messages
329
+ ```python
330
+ import json_duplicate_keys as jdks
331
+
332
+ Jstr = '{"author": "truocphan", "version": "22.3.3", "version": "latest", "release": [{"version": "latest"}], "snapshot": {"author": "truocphan", "version": "22.3.3", "release": [{"version": "latest"}]}}'
333
+
334
+ JDKSObject = jdks.loads(Jstr)
335
+
336
+ print(JDKSObject.getObject())
337
+ # OUTPUT: {'author': 'truocphan', 'version': '22.3.3', 'version{{{_2_}}}': 'latest', 'release': [{'version': 'latest'}], 'snapshot': {'author': 'truocphan', 'version': '22.3.3', 'release': [{'version': 'latest'}]}}
338
+
339
+ JDKSObject.flatten()
340
+
341
+ print(JDKSObject.getObject())
342
+ # OUTPUT: {'author': 'truocphan', 'version': '22.3.3', 'version{{{_2_}}}': 'latest', 'release||$0$||version': 'latest', 'snapshot||author': 'truocphan', 'snapshot||version': '22.3.3', 'snapshot||release||$0$||version': 'latest'}
343
+ ```
344
+ ---
345
+
346
+ ### JSON_DUPLICATE_KEYS.unflatten(`separator`="||", `parse_index`="$", `ordered_dict`=False, `_isDebug_`=False)
347
+ _Unflatten a flattened JSON object back to a JSON object_
348
+ - `separator`:
349
+ - `parse_index`:
350
+ - `ordered_dict`: preserves the order in which the Keys are inserted
351
+ - `_isDebug_`: Show/ Hide debug error messages
352
+ ```python
353
+ import json_duplicate_keys as jdks
354
+
355
+ Jstr = '{"author": "truocphan", "version": "22.3.3", "version": "latest", "release||$0$||version": "latest", "snapshot||author": "truocphan", "snapshot||version": "22.3.3", "snapshot||release||$0$||version": "latest"}'
356
+
357
+ JDKSObject = jdks.loads(Jstr)
358
+
359
+ print(JDKSObject.getObject())
360
+ # OUTPUT: {'author': 'truocphan', 'version': '22.3.3', 'version{{{_2_}}}': 'latest', 'release||$0$||version': 'latest', 'snapshot||author': 'truocphan', 'snapshot||version': '22.3.3', 'snapshot||release||$0$||version': 'latest'}
361
+
362
+ JDKSObject.unflatten()
363
+
364
+ print(JDKSObject.getObject())
365
+ # OUTPUT: {'author': 'truocphan', 'version': '22.3.3', 'version{{{_2_}}}': 'latest', 'release': [{'version': 'latest'}], 'snapshot': {'author': 'truocphan', 'version': '22.3.3', 'release': [{'version': 'latest'}]}}
366
+ ```
367
+ ---
368
+ Keywords: TPCyberSec,json,duplicate keys,json duplicate keys,flatten,unflatten
369
+ Platform: UNKNOWN
370
+ Classifier: Programming Language :: Python :: 3
371
+ Classifier: Programming Language :: Python :: 2
372
+ Classifier: Programming Language :: Python :: Implementation :: Jython
373
+ Description-Content-Type: text/markdown
@@ -444,6 +444,26 @@ class JSON_DUPLICATE_KEYS:
444
444
  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
445
445
 
446
446
 
447
+ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
448
+ # # # # # # # # # # # # filter_keys # # # # # # # # # # # # #
449
+ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
450
+ def filter_keys(self, name, separator="||", parse_index="$", ordered_dict=False):
451
+ import re, copy
452
+
453
+ JDKSObject = copy.deepcopy(self)
454
+ JDKSObject.flatten(separator=separator, parse_index=parse_index, ordered_dict=ordered_dict)
455
+ newJDKSObject = loads("{}", ordered_dict=ordered_dict)
456
+
457
+ for k in JDKSObject.getObject():
458
+ if re.search(name, k):
459
+ newJDKSObject.set(k, JDKSObject.get(k, separator="§§"+separator+"§§", parse_index="§§"+parse_index+"§§"), separator="§§"+separator+"§§", parse_index="§§"+parse_index+"§§", ordered_dict=ordered_dict)
460
+
461
+ return newJDKSObject
462
+ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
463
+ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
464
+ # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
465
+
466
+
447
467
  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
448
468
  # # # # # # # # # # # # # # dumps # # # # # # # # # # # # # #
449
469
  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@@ -1,12 +1,11 @@
1
1
  import setuptools
2
- import datetime
3
2
 
4
3
  setuptools.setup(
5
4
  name="json-duplicate-keys",
6
- version=datetime.datetime.now().strftime("%Y.%m.%d"),
7
- author="Truoc Phan",
5
+ version="2024.2.21",
6
+ author="TP Cyber Security",
8
7
  license="MIT",
9
- author_email="truocphan112017@gmail.com",
8
+ author_email="tpcybersec2023@gmail.com",
10
9
  description="Flatten/ Unflatten and Load(s)/ Dump(s) JSON File/ Object with Duplicate Keys",
11
10
  long_description=open("README.md").read(),
12
11
  long_description_content_type="text/markdown",
@@ -17,6 +16,6 @@ setuptools.setup(
17
16
  "Programming Language :: Python :: 2",
18
17
  "Programming Language :: Python :: Implementation :: Jython"
19
18
  ],
20
- keywords=["json", "duplicate keys", "json duplicate keys", "flatten", "unflatten"],
19
+ keywords=["TPCyberSec", "json", "duplicate keys", "json duplicate keys", "flatten", "unflatten"],
21
20
  packages=["json_duplicate_keys"],
22
21
  )
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2022 Truoc Phan
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1 +0,0 @@
1
- include requirements.txt