Skip to content

Commit

Permalink
Bump canonical_json version to 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem committed Sep 11, 2020
1 parent 726c4d0 commit 4aa0ab2
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 21 deletions.
59 changes: 50 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "canonicaljson-rs"
version = "0.1.0"
version = "0.2.0"
authors = ["Mathieu Leplatre <[email protected]>"]
edition = "2018"
description = "Python bindings for canonical_json"
Expand All @@ -14,7 +14,7 @@ crate-type = ["cdylib"]
[dependencies]
serde = "1.0"
serde_json = "1.0"
canonical_json = { version = "0.1.0", path = "../canonicaljson-rs/" }
canonical_json = "0.2.0"

[dependencies.pyo3]
version = "0.11"
Expand Down
20 changes: 12 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ Usage
* ``canonicaljson.dump(obj: Any, stream: IO) -> str``


See Also
========

* https://github.com/Kinto/kinto-signer/blob/6.1.0/kinto_signer/canonicaljson.py
* https://searchfox.org/mozilla-central/rev/b2395478c/toolkit/modules/CanonicalJSON.jsm
* https://github.com/matrix-org/python-canonicaljson
* The code to build a ``serde_json::Value`` from a ``pyo3::PyObject`` was greatly inspired by Matthias Endler's `hyperjson <https://github.com/mre/hyperjson/>`_

Development
===========

Expand Down Expand Up @@ -63,6 +55,18 @@ Update version in ``Cargo.toml`` and:
maturin build
maturin publish
See Also
========

* https://github.com/gibson042/canonicaljson-spec
* The code to build a ``serde_json::Value`` from a ``pyo3::PyObject`` was greatly inspired by Matthias Endler's `hyperjson <https://github.com/mre/hyperjson/>`_

Other specs:

* https://github.com/Kinto/kinto-signer/blob/6.1.0/kinto_signer/canonicaljson.py
* https://searchfox.org/mozilla-central/rev/b2395478c/toolkit/modules/CanonicalJSON.jsm
* https://github.com/matrix-org/python-canonicaljson

License
=======

Expand Down
4 changes: 2 additions & 2 deletions tests/test_dumps.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
(["b", 2, 1], '["b",2,1]'),
(("on", "off"), '["on","off"]'),
(1, "1"),
(3.14, "3.14"),
(3.14, "3.14E0"),
(False, "false"),
(True, "true"),
("s", '"s"'),
("é", '"\\u00e9"'),
(10.0**21, '1e+21'),
(10.0**21, '1E21'),
("1\n 2 \t \b\f", '"1\\n 2 \\t \\b\\f"'),
("\xff I ❤ testing", r'"\u00ff I \u2764 testing"'),
(r" \" ", r'" \\\" "'),
Expand Down

0 comments on commit 4aa0ab2

Please sign in to comment.