We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4565879 commit a692f4dCopy full SHA for a692f4d
examples/index.html
@@ -33,7 +33,10 @@ <h1>Pickle Parser Demo</h1>
33
reader.onload = function (event) {
34
try {
35
const buffer = new Uint8Array(event.target.result);
36
- const parser = new pickleparser.Parser();
+ const parser = new pickleparser.Parser({
37
+ unpicklingTypeOfSet: 'Set',
38
+ unpicklingTypeOfDictionary: 'Map',
39
+ });
40
const obj = parser.parse(buffer);
41
window.obj = obj;
42
const replacer = (_, value) => {
@@ -46,6 +49,9 @@ <h1>Pickle Parser Demo</h1>
46
49
if (typeof value === 'bigint') {
47
50
return value.toString();
48
51
}
52
+ if (value?.constructor?.name === 'PFunction') {
53
+ return value.args;
54
+ }
55
return value;
56
};
57
const json = JSON.stringify(obj, replacer, 4);
0 commit comments