Skip to content

class JsonWebKeySetSerializer

cangjie
public class JsonWebKeySetSerializer

功能:提供 JsonWebKeySet 的 JSON 序列化与反序列化能力。

成员概览

成员功能
func read(String, JsonWebKeySet)从 JSON 字符串读取 JWK 集合。
func write(JsonWebKeySet)将 JWK 集合写为 JSON 字符串。
func writeAsJson(JsonWebKeySet)将 JWK 集合写为 JSON 对象。

func read(String, JsonWebKeySet)

cangjie
public static func read(json: String, jsonWebKeySet: JsonWebKeySet): Unit

功能:从 JSON 字符串读取 JWK 集合。

参数:

  • json: String - 包含 JWKS 数据的 JSON 字符串。
  • jsonWebKeySet: JsonWebKeySet - 要写入的 JWK 集合对象。

返回值:

  • Unit

func write(JsonWebKeySet)

cangjie
public static func write(jsonWebKeySet: JsonWebKeySet): String

功能:将 JWK 集合写为 JSON 字符串。

参数:

返回值:

  • String - 序列化后的 JSON 字符串。

func writeAsJson(JsonWebKeySet)

cangjie
public static func writeAsJson(jsonWebKeySet: JsonWebKeySet): JsonObject

功能:将 JWK 集合写为 JSON 对象。

参数:

返回值:

  • JsonObject - 序列化后的 JSON 对象。