A JWSSerializerManagerFactory
is available as a service in your application container:
With this factory, you will be able to create the JWSSerializerManager you need:
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
There is also another way to create a JWSSerializerManager object: using the bundle configuration.
With the previous configuration, the bundle will create a public JWS Serializer Manager service named jose.jws_serializer.serializer1
with selected serialization modes.
You can add custom tags and attributes to the services you create.