Fix JSON serialization and absolute URIs