@jaywink @cj@mastodon.technology @heluecht the way mastodon currently serializes it is also valid JSON-LD, although there ARE some subtle differences between the two. As I understand it, the array form is including the entire context while the object form is only referencing the namespace.
mastodon would not be able to process "sec:publicKey" currently, but I would prefer you federate the extension the way you prefer to and then open an issue to have us make our code compatible rather then the other way around.