Add support for json serlization

This pull request adds support for json serialization of the topology. To do this, `from_json` and `to_json` functions have been added to the `VERTEX` and `EDGE` signatures.