Skip to content

Canonicalize a graph? #11

@alexgleason

Description

@alexgleason

In Ruby, it is possible to get a string of a canonicalized graph like this (code from Mastodon):

  def canonicalize(json)
    graph = RDF::Graph.new << JSON::LD::API.toRdf(json, documentLoader: method(:load_jsonld_context))
    graph.dump(:normalize)
  end

I'm trying to do something similar in Elixir to verify JSON-LD signatures in ActivityPub.

I guess :normalize would be a serialization format. Is this library able to do it at this time?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions