You can now use the JWSSerializerManager as explained in the JWS Creation/Loading section.
Available JWS serialization modes are:
jws_compact
jws_json_general
jws_json_flattened
JWS Serializer Manager As Service
There is also another way to create a JWSSerializerManager object: using the bundle configuration.
1
jose:
2
jws:
3
serializers:
4
serializer1:
5
serializers:['jws_compact']
6
is_public:true
Copied!
With the previous configuration, the bundle will create a public JWS Serializer Manager service named jose.jws_serializer.serializer1 with selected serialization modes.