Closed AnasMK closed 3 years ago
Hi @AnasMK, there once was support for Python 2.7 but I removed when the Python authors decided to halt the 2.7 branch. On the other hand, the existing implementation is very basic so it might very well run in 2.7 as well. The test programs would verify if that is the case. Regards, @cyberphone (Anders)
Hi @cyberphone, thank you, I really appreciate your quick replay.
I have tried to run tests using python 2.7, there were some syntax errors in Canonicalize.py
I did these changes:
yeild from
statement to for loop in 5 places
for bar in foo:
yield bar
After these changes verify-canonicalization.py
produce this error:
TypeError: Object of type 'unicode' is not JSON serializable
Any help to resolve this issue. Thank you.
Hi @cyberphone, If you have a local copy of the Python 2.7 branch, it will be much appreciated to upload it again :pray:.
It seems that I lost that branch during a restructuring. Usually I put unsupported stuff in the "historical" repo but this time not 😔
Hi @AnasMK I would consider porting https://github.com/gowebpki/jcs/blob/master/jcs.go as an alternative. This may be easier to follow: https://github.com/cyberphone/json-canonicalization/blob/master/dotnet/jsoncanonicalizer/JsonCanonicalizer.cs
Hi, Thanks for your support @cyberphone, I had successfully ported Python3 code to Python2.7.
verify-numbers.py
passed the initial tests, still needs to test with the large text fileverify-canonicalization.py
passed all the testsFor anyone is interested in Python 2.7 version I have pushed the code on this Forked repository
@cyberphone, Thank you again for your efforts with this repo.
Thanks and Congratulations! I will update my JCS info with your implementation.
Hey there,
Is there any support for Python 2.7