implement flattened JWS serialisation